Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious mport package with absolute sample-file path
-
DeliveryDeliver package to target (repo/download)
-
ExploitAdmin installs package as root
-
Executioncreate_sample_file writes outside install root
-
PersistOverwrite protected system file
-
ImpactCompromise local filesystem integrity
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that a MidnightBSD system administrator install a maliciously crafted or malformed mport package (running mport's privileged install path as root) whose sample-file manifest directive specifies an absolute source/destination path. The vulnerable code path is create_sample_file() in libmport/bundle_read_install_pkg.c in mport versions prior to 2.7.8. Limiting factors: the attacker must get the victim to obtain and install the malicious package (user interaction / social engineering or a compromised package source), the target must run vulnerable mport <2.7.8, and the install must occur with the privileges needed to write outside the install root (typically root) - there is no remote, unauthenticated, no-interaction path despite the vendor AV:N rating. |
| Impact | This is a genuine but tightly-gated integrity flaw, not a broadly-exploitable network threat. The source diff confirms the root cause: create_sample_file() used strlcpy() to copy absolute source/destination paths straight from the package's sample-file manifest directive without prefixing mport->root, so privileged sample-file handling could write or copy files anywhere on disk. The fix (snprintf with "%s%s", mport->root, file) confirms the path-confinement failure. No EPSS score, no CISA KEV listing, and no public exploit code are present in the input - so exploitation status is 'no public exploit identified at time of analysis'. The vendor CVSS 4.0 vector rates AV:N, but this is inconsistent with the actual mechanism: exploitation requires an administrator to locally install a malicious/malformed package (a local, user-interaction-gated action), so the network attack vector overstates reach - verify with vendor. The realistic risk driver is VI:H / integrity impact (arbitrary root-owned file write outside the install root, which is escalatable to code execution via overwriting system files), tempered by VA:L and no confidentiality impact. Net: real but conditional - priority only for environments that actually run MidnightBSD and install third-party mport packages. |
| Exploit ScenarioDerived | An attacker crafts an mport package whose sample-file manifest directive contains an absolute path (e.g. pointing at /etc or a system binary) instead of a path inside the install root. An administrator installs this package as root; create_sample_file() copies/writes the sample content to the attacker-chosen absolute path outside mport->root, corrupting or planting files anywhere on the filesystem. No public POC is present in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Path traversal in MidnightBSD mport before 2.7.8 allows a crafted package manifest to make the privileged sample-file handler write or copy files outside the configured installation root, corrupting arbitrary local files. Exploitation requires a system administrator to install the malicious or malformed package with sufficient privileges (typically root) and to interact with the install, so it is a local, user-interaction-gated integrity flaw rather than a remote unauthenticated attack; no public exploit has been identified at time of analysis.
RemediationAI
Vendor-released patch: 2.7.8. Upgrade mport to 2.7.8 or later (https://github.com/MidnightBSD/mport/releases/tag/2.7.8), which constrains sample-file paths under mport->root as implemented in https://github.com/MidnightBSD/mport/pull/122 and commit https://github.com/MidnightBSD/mport/commit/36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0; see also the advisory https://github.com/MidnightBSD/mport/security/advisories/GHSA-xqjc-rxmm-p27v. If immediate upgrade is not possible, restrict installations to packages from trusted, integrity-verified sources and manually audit manifests for sample-file directives that specify absolute paths before running a privileged mport install - this reduces exposure but relies on operator diligence and does not fix the underlying path traversal. Running mport only as a non-root user or inside a jail or disposable environment limits the blast radius to that context, at the cost of not being able to modify system paths; blocking or validating package acquisition channels adds defense in depth but is not a substitute for the patch.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a CWE-22 path traversal in create_sample_file() within libmport/bundle_read_install_pkg.c. The function processed the sample-file manifest directive and used strlcpy to copy the attacker-controlled file and fileargv[1] values directly into nonSample and secondFile buffers without prefixing mport->root. An absolute source or destination path in the manifest therefore escaped the installation root, allowing the privileged sample-file copy or write to target locations outside the intended tree. The upstream fix in PR #122 and commit 36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0 replaces those calls with snprintf(..., "%s%s", mport->root, file) and snprintf(..., "%s%s", mport->root, fileargv[1]), forcing every path under mport->root. Affected component: mport package manager on MidnightBSD, matching CPE cpe:2.3:a:midnightbsd:mport:*:*:*:*:*:*:*:*; fixed in version 2.7.8.
Know when Mport gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
Local package install with admin interaction (AV:L/UI:R); attacker needs no prior privileges (PR:N); arbitrary root file write gives I:H, minor A:L, no confidentiality impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
mport is the MidnightBSD Package Manager. Prior to 2.7.8, create_sample_file() in libmport/bundle_read_install_pkg.c did not constrain absolute source and destination paths from the sample-file manifest directive to mport->root. A malicious or malformed package manifest could therefore direct privileged sample-file handling to copy or write outside the configured installation root, compromising local filesystem integrity. This issue is fixed in version 2.7.8.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Package-index corruption and denial of package-management operations affect MidnightBSD mport before 2.7.8 when a malici
Path traversal in the MidnightBSD mport package manager (libmport/fetch.c) before version 2.7.8 lets an attacker who con
MidnightBSD's mport package manager prior to 2.7.8 can accept a tampered bootstrap package index as verified, because th
On-path tampering with package-fetch traffic in MidnightBSD's mport package manager lets a network-positioned attacker s
Package file overwrite in MidnightBSD mport prior to 2.7.8 allows a crafted package installed with privileges to replace
Path-racing and shell-invocation weaknesses in the MidnightBSD mport package manager (all versions prior to 2.7.8) let a
Filesystem integrity compromise in MidnightBSD's mport package manager (versions prior to 2.7.8): a local user who alrea
Symlink following and dot-dot path traversal in MidnightBSD mport prior to 2.7.8 lets a local attacker who can already w
MidnightBSD's mport package manager before 2.7.8 trusts the TMPDIR environment variable when extracting package metafile
Spoofed or injected ICMP echo replies can steer mport's mirror-latency selection toward an attacker-chosen mirror and, i
MidnightBSD's mport package manager, in all versions prior to 2.7.8, mis-parses the argument list for its 'audit' subcom
Checksum verification in MidnightBSD's mport package manager before 2.7.8 can silently continue after a hashing failure,
EUVD-2026-82323
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB