Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local write access to install target directory
-
DeliveryAwait/trigger privileged package install
-
ExploitReplace extracted file with symlink mid-install
-
ExecutionPrivileged chown/chmod follows symlink to attacker path
-
ImpactAttacker gains ownership/permissions on protected file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Requires local access to a MidnightBSD system AND pre-existing write permission to a directory targeted by an mport package install, so the attacker can substitute a symlink for a just-extracted file. Exploitation further requires winning a narrow TOCTOU race window between file extraction and the privileged lstat/chown/stat/chmod sequence in do_actual_install() (reflected as AC:H/AT:P), and depends on a privileged install (typically root running mport) actually being performed while the attacker is racing. Limiting factors: no remote vector (AV:L), attacker must already be a local, partially-privileged user (PR:L), timing is non-trivial, and only mport versions prior to 2.7.8 are affected - hosts on 2.7.8+ (fd-based fchown/fchmod with O_NOFOLLOW) are not exploitable. |
| Impact | This is a genuine but low-priority, high-gate integrity issue rather than a broadly exploitable flaw. The vendor CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:L/UI:N, VC:N/VI:H/VA:L) is internally consistent with the description and the fix: exploitation is LOCAL, requires the attacker to already hold write access to a package install target directory (PR:L), demands winning a narrow TOCTOU race between file extraction and the privileged chown/chmod (AC:H plus AT:P attack-requirement), and yields no confidentiality impact (VC:N) - only filesystem integrity/permission compromise (VI:H) and minor availability effects (VA:L). 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. All signals agree on modest real-world risk; there is no CVSS-vs-description conflict. The one metadata conflict worth flagging: the 'Information Disclosure' tag contradicts the VC:N (no confidentiality) in the vendor vector - this vulnerability discloses nothing and the tag is mislabeled. A fix is confirmed available (2.7.8, PR #150, commit 4676ac0), which further lowers urgency for anyone who can update. |
| Exploit ScenarioDerived | On a multi-user MidnightBSD host, a local attacker who can write to a directory where a package is about to be installed pre-plants or races a symlink into place: after mport extracts a regular file but before it applies the packaged ownership/mode, the attacker replaces that file with a symlink pointing at a sensitive target (e.g. a system file). The privileged install process then follows the symlink and applies chown/chmod to the attacker-chosen path, granting the attacker ownership or weakened permissions on a file they should not control. No public exploit code is identified, and success depends on winning a timing race (AC:H/AT:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Filesystem integrity compromise in MidnightBSD's mport package manager (versions prior to 2.7.8): a local user who already holds write access to a directory targeted by a package installation can race a symlink substitution between file extraction and the privileged ownership/mode changes that follow, redirecting a root-run chown/chmod onto an attacker-chosen path. Exploitation is heavily gated - it requires an authenticated local attacker with pre-existing directory write permission, a privileged install actually in progress, and a successful win of a narrow TOCTOU window (consistent with the assessed AV:L/AC:H/PR:L vector, High integrity and Low availability impact) - so this is a genuine but low-priority integrity issue rather than a broadly exploitable flaw. No public exploit code was identified at time of analysis and there is no evidence of active exploitation; mport 2.7.8 closes the race by switching to descriptors opened with O_NOFOLLOW and fchown/fchmod.
RemediationAI
Vendor-released patch: upgrade mport to version 2.7.8 (https://github.com/MidnightBSD/mport/releases/tag/2.7.8), which contains the fix from PR #150 / commit 4676ac05b1056b54a3d38d03ae8a478bf12c9abe; verify the installed mport build reports 2.7.8 or later before considering the host remediated. Until the upgrade can be applied, the most effective compensating control is to remove the attacker's precondition rather than the race itself: audit package installation target directories (prefixes such as /usr/local and any custom install roots) and ensure they are owned by root and not writable by unprivileged or partially-privileged users, since the attack requires pre-existing write access to a directory mport installs into - the trade-off is that shared or user-owned install prefixes will no longer accept unprivileged writes and some multi-user workflows may break. Alternatively, stage all privileged installs from a root-owned directory with mode 0755 that is never group- or world-writable, avoiding package installation directly into user-controlled or world-writable paths; this constrains where packages can be deployed and may require reworking per-user installation procedures. As a detective measure, periodically audit installed trees for unexpected symlinks in package-managed directories and for files whose ownership or mode changed outside a known package transaction, though detection after the fact cannot undo a redirected chmod. No vendor-released patch beyond 2.7.8 is identified as necessary, and there is no public exploit code or confirmed active exploitation to justify emergency mitigations beyond upgrading.
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 classic time-of-check/time-of-use symlink-following race (CWE-59, Link Following) in do_actual_install() within libmport/bundle_read_install_pkg.c. After a package file is extracted, the vulnerable code re-resolved the path with lstat(), chown(), stat() and chmod(), meaning each of those privileged operations performed its own fresh path lookup. Between the extraction/check step and the ownership or mode change, an attacker who can write to the destination directory could unlink the extracted regular file and substitute a symlink; the subsequent chown()/chmod() would then follow that link and apply root-level ownership or permission changes to a file of the attacker's choosing, corrupting permissions elsewhere on the filesystem. The upstream fix in PR #150 (commit 4676ac05b1056b54a3d38d03ae8a478bf12c9abe) opens the freshly extracted file once with open(file, O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC), verifies it is a regular file via fstat(), and then performs fchown()/fchmod() on the descriptor rather than on the path, so a swapped symlink (EMLINK/ELOOP) can no longer redirect the privileged operations; O_NONBLOCK prevents hanging if the path was replaced by a FIFO, and the descriptor is closed on all exit paths including the ERROR path. This mirrors the descriptor-based directory handling already used in apply_dir_asset_attrs(). The affected component is identified by CPE cpe:2.3:a:midnightbsd:mport:*:*:*:*:*:*:*:*. Note that the associated advisory tags include "Information Disclosure", but the authoritative assessment and the patch itself describe an integrity/availability impact (redirected ownership and permissions), not data exposure, so the disclosure tag should not be read as the primary effect.
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 attacker with write access to the install path (AV:L/PR:L) must win a symlink TOCTOU race (AC:H); impact is integrity/permission compromise (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, do_actual_install() in libmport/bundle_read_install_pkg.c used path-based lstat(), chown(), stat(), and chmod() operations while installing package files. A local attacker with write access to a target directory could replace a checked file with a symlink before privileged ownership or mode changes were applied, redirecting those changes to an attacker-selected path and compromising filesystem integrity or permissions. 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
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
Path-racing and shell-invocation weaknesses in the MidnightBSD mport package manager (all versions prior to 2.7.8) let a
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-82329
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB