Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local access with cache write (PR:L)
-
DeliveryStage symlink/path swap in shared cache
-
ExploitTrigger privileged mport fetch/clean/install
-
ExecutionWin TOCTOU race on path check
-
PersistRedirect write/download outside cache
-
ImpactCorrupt or overwrite privileged files (VI:H)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a LOCAL attacker (AV:L) who already holds low privileges (PR:L) AND has write access to a participating mport package cache or staging path. Exploitation further requires a privileged mport operation (fetch, cache-clean, or install) to run concurrently so the attacker can win a timing-sensitive race against the path checks and replacement operations (AC:H plus AT:P attack requirement). No user interaction is needed (UI:N), but the flaw is not remotely reachable and does not work against a system where the attacker lacks write access to the shared cache/staging directory. The shell-form helper invocation additionally requires the attacker to influence command-line interpretation during the privileged helper execution. These factors - local-only reach, required cache write access, and a hard-to-win race window - substantially limit realistic exploitation. |
| Impact | This is a genuinely LOW-to-MODERATE real-world risk despite the CWE-78 'Command Injection' framing. The CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L, base 5.8) tells a consistent story of a LOCAL, race-condition-gated, integrity-focused flaw - not a remote code-execution bug. Attack vector is Local, complexity is High, and there is an explicit Attack Requirement (AT:P) reflecting the race window, all of which sharply limit realistic exploitability. The attacker already needs low-level local privileges (PR:L) AND write access to a participating package cache or staging path, so this is a privilege/scope escalation within an already-local foothold rather than an entry point. No EPSS score, no CISA KEV listing, and no public exploit code were provided, so exploitation status is 'no public exploit identified at time of analysis.' NOTE A TENSION IN THE LABELING: the description's core mechanism is race-prone path handling (a TOCTOU/symlink class of bug, CWE-367/CWE-59), with shell-form helper invocation as a secondary command-line-interpretation concern - the CWE-78 'Command Injection' tag captures only the secondary aspect. The impact set (VC:N, VI:H, VA:L) confirms this is about redirecting file/download operations outside the intended cache (integrity), not reading secrets or achieving reliable arbitrary execution. Bottom line: real but low-priority for most defenders; matters mainly to the small population running MidnightBSD who apply untrusted local users or shared staging paths. |
| Exploit ScenarioDerived | A local user with write access to a shared mport package cache or staging directory watches for a privileged mport fetch/clean/install operation, then races the path check and file-replacement steps (e.g., swapping a path or symlink between check and use) to redirect a download, cleanup, or install side-effect to a location outside the intended cache - corrupting or overwriting files with elevated privileges. Because the operation runs shell-form helper invocations, the attacker may further influence command-line interpretation during the privileged helper execution. No public exploit code was identified, and success depends on winning a timing-sensitive race (AC:H/AT:P), so exploitation is non-trivial. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Path-racing and shell-invocation weaknesses in the MidnightBSD mport package manager (all versions prior to 2.7.8) let a local, low-privileged attacker who can write to a participating package cache or staging path redirect privileged fetch, cache-clean, and install-related side effects outside the intended cache, and potentially influence command-line interpretation during privileged helper execution. The flaw spans libmport/fetch.c, clean.c, util.c, bundle_read_install_pkg.c, delete_primative.c, and libexec/mport.create/mport.create.c, and only becomes exploitable when a privileged mport operation runs concurrently so the attacker can win a timing-sensitive race; there is no remote reach and no public exploit identified at time of analysis. Because it requires local access, write permission on a shared cache/staging directory, and a hard-to-win race against a privileged process (AC:H, AT:P), the realistic risk is low-to-moderate despite the command-injection framing, and upgrading to 2.7.8 resolves it.
RemediationAI
Vendor-released patch: 2.7.8. Upgrade mport to 2.7.8 or later using the release at https://github.com/MidnightBSD/mport/releases/tag/2.7.8, and verify the change by confirming the fixing commit https://github.com/MidnightBSD/mport/commit/29154b0fdfb5806568ed1277e88d942bad6d1169 is present; the advisory at https://github.com/MidnightBSD/mport/security/advisories/GHSA-h387-g4pf-28cj documents the issue. If immediate upgrade is not possible, reduce exposure by removing write access for untrusted local users to every mport package cache and staging directory (tighten ownership and permissions so only root or a trusted group can write there), since the attack requires write access to a participating cache or staging path and this control directly removes the attacker's foothold, at the cost of requiring tighter administrative control over cache directories and potentially breaking shared or multi-user build workflows. Avoid running privileged mport fetch, cache-clean, or install operations concurrently with other users' package activity, and prefer serializing such operations to shrink the race window, though this is only a partial mitigation because the underlying TOCTOU and shell-invocation weaknesses remain. Do not assume existing mport hardening removes the risk before 2.7.8, as the shell-form lifecycle helper invocation is only replaced by the safe UCL-manifest parsing introduced in the fix.
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 issue is classified under CWE-78 (improper neutralization of special elements used in an OS command, i.e. command injection), but the root cause and exploit mechanics combine two related problems in mport's privileged helper code. First, privileged package fetch and cache-cleaning operations used race-prone path handling across libmport/fetch.c, libmport/clean.c, libmport/util.c, libmport/bundle_read_install_pkg.c, libmport/delete_primative.c, and libexec/mport.create/mport.create.c: path checks and subsequent file replacement operations were not atomic, creating a time-of-check-to-time-of-use (TOCTOU) window. An attacker with write access to a package cache or staging path can manipulate that window to redirect where downloads land, what cleanup deletes, or where install-related side effects occur. Second, the affected lifecycle helper paths were invoked through a shell rather than through a safe argument vector, raising the risk that attacker-influenced values are interpreted as shell syntax during privileged execution. The upstream fix in the 2.7.8 release series, illustrated by PR #118, moves mport.create toward directly parsing a UCL manifest (a new -X manifest option using libucl) instead of relying on shell-form invocation, eliminating the command-line interpretation surface while hardening the surrounding path handling. Affected products are captured by the CPE cpe:2.3:a:midnightbsd:mport:*:*:*:*:*:*:*:*, i.e. all mport package versions before the 2.7.8 fix.
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:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
Local cache-write foothold and a TOCTOU race set AV:L/AC:H/PR:L; impact is integrity redirection of privileged writes (I:H) with minor availability (A:L) and no confidentiality (C:N).
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, privileged package fetch and cache-cleaning operations used race-prone path handling across libmport/fetch.c, libmport/clean.c, libmport/util.c, libmport/bundle_read_install_pkg.c, libmport/delete_primative.c, and libexec/mport.create/mport.create.c. A local attacker with write access to a participating package cache or staging path could race path checks and replacement operations to redirect package downloads, cleanup, or install-related side effects outside the intended cache. The affected lifecycle helper paths also used shell-form invocation, increasing command-line interpretation risk during privileged helper execution. 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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
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
Path traversal in MidnightBSD mport before 2.7.8 allows a crafted package manifest to make the privileged sample-file ha
Package file overwrite in MidnightBSD mport prior to 2.7.8 allows a crafted package installed with privileges to replace
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-82327
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB