Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local shell on MidnightBSD host
-
DeliverySet malicious TMPDIR environment variable
-
ExploitTrigger privileged/setuid mport package operation
-
ExecutionMetadata extraction redirected to attacker path
-
ImpactPlant or overwrite files as root
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Requires an attacker with LOCAL presence on a MidnightBSD system who can control the environment (specifically the TMPDIR variable) of an mport invocation that runs as root or in a setuid/setgid context - i.e., the privileged package operation must inherit the attacker-influenced environment. Limiting factors: exploitation is gated on a local (non-network) foothold, on a privileged/setuid mport run actually occurring, and on winning the extraction timing; it does not apply to unprivileged mport use (where trusting TMPDIR is intentional). Only mport versions before 2.7.8 are affected. |
| Impact | This is a genuinely low-to-moderate-risk local privilege/path-integrity issue, not a high-priority remotely exploitable flaw. The vendor's CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L, base 5.3) is internally inconsistent with the description: exploitation requires an attacker to CONTROL THE ENVIRONMENT (TMPDIR) of a locally-invoked privileged/setuid mport process, which is a LOCAL attack surface, not network - AV:N appears overstated and should be AV:L. The impact framing is also questionable: redirecting where metadata is extracted (CWE-73, external control of file name/path) is fundamentally a filesystem integrity / potential privilege-escalation primitive (symlink or file-planting into a root-controlled extraction path), yet the vector lists confidentiality-only (VC:L, VI:N). No EPSS score, no CISA KEV listing, and no public exploit code were provided in the intelligence - so this is not confirmed exploited and not weaponized. SSVC/automatability data is absent. Net: a defensively-important hardening fix (setuid programs should never trust TMPDIR) but a low real-world exploitation likelihood, gated on a local presence and a race against a privileged mport run. Verify the attack vector with the vendor - description implies local environment control, contradicting the AV:N in the CVSS vector. |
| Exploit ScenarioDerived | A local unprivileged user on a MidnightBSD host sets a malicious TMPDIR (e.g., pointing at a directory or symlink they control) and then triggers, or waits for, a privileged/root or setuid mport package operation. Because pre-2.7.8 mport reads TMPDIR even under elevated privileges, package metafile extraction is redirected to the attacker's location, enabling file planting or symlink-style manipulation against a root-owned write. No public exploit code was identified in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 21, 2026
MidnightBSD's mport package manager before 2.7.8 trusts the TMPDIR environment variable when extracting package metafiles, so an attacker who can influence the environment of a privileged (root or setuid/setgid) mport invocation can redirect temporary metadata extraction into a location they control. Exploitation requires a local foothold on a MidnightBSD host, a privileged mport run that inherits the attacker-supplied environment, and success in the extraction timing window, which keeps this a low-to-moderate-risk local path-integrity issue rather than a remotely exploitable flaw; no public exploit code or confirmed active exploitation (CISA KEV) was identified at time of analysis. The issue is fixed in mport 2.7.8 via upstream PR 123 (commit 3790fa4), which ignores unsafe TMPDIR values in privileged contexts and rejects empty TMPDIR.
RemediationAI
Vendor-released patch: upgrade mport to version 2.7.8 (release tag https://github.com/MidnightBSD/mport/releases/tag/2.7.8), which contains the fix from PR 123 (commit 3790fa49a36cb085f48b204ef189fb82bbee621a) that ignores TMPDIR whenever issetugid() is true or the effective UID is 0 and also rejects empty TMPDIR values; see advisory https://github.com/MidnightBSD/mport/security/advisories/GHSA-4vv3-3h8r-q6mq. Until systems can be upgraded, block the prerequisite rather than the symptom: strip or override TMPDIR before any privileged mport run, for example by ensuring sudo uses env_reset without TMPDIR in env_keep, by invoking mport through a wrapper that unsets TMPDIR, or by requiring TMPDIR to be unset or set to a root-owned location such as /tmp; the trade-off is that scripts or build harnesses relying on a custom TMPDIR for privileged package operations will lose that customization and fall back to the default temporary directory. Additionally, avoid running mport from setuid/setgid contexts or with attacker-influenced environments where practical, and monitor for privileged mport invocations whose environment originates from unprivileged users; unprivileged mport use can continue trusting TMPDIR as designed and needs no compensating change.
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 an instance of CWE-73 (External Control of File Name or Path) in mport, the MidnightBSD (FreeBSD-derived) package manager. In libmport/bundle_read.c, the function mport_bundle_read_extract_metafiles() read the process environment with getenv("TMPDIR") and used that string as the destination directory for extracting package metadata, without distinguishing between an unprivileged user's own session and a root or setuid/setgid execution context. Because environment variables are attacker-influenceable when a privileged program is launched with a preserved environment (for example via sudo env_keep or a setuid binary), the extraction path could be pointed at an attacker-chosen directory, enabling path-manipulation and integrity attacks against the extraction process. The upstream fix captured in PR 123 (commit 3790fa49a36cb085f48b204ef189fb82bbee621a) changes the logic to tmpdir = (issetugid() || geteuid() == 0) ? NULL : getenv("TMPDIR"), forcing a safe default whenever privileges are elevated, and additionally rejects an empty TMPDIR value; the patch pulls in <unistd.h> for issetugid()/geteuid(). Our independent assessment scores this as a local, higher-complexity issue (AV:L/AC:H/PR:L, integrity-only impact, C:N/I:L/A:N) rather than the CNA's CVSS 4.0 score of 5.3 with an AV:N vector, and the practical impact is bounded to manipulation of where temporary metadata lands, not code execution or confidentiality loss.
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:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Attacker must control a local privileged process's environment and win an extraction race (AV:L, AC:H, PR:L); impact is filesystem path redirection (integrity I:L), not disclosure.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
mport is the MidnightBSD Package Manager. mport before 2.7.8 used TMPDIR while extracting package metafiles, including when running as root or in setuid/setgid contexts. An attacker able to control the environment for a privileged mport invocation could redirect temporary metadata extraction to an attacker-controlled location. PR 123 ignores unsafe TMPDIR values in privileged contexts and rejects empty TMPDIR. This issue has been patched 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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
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
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-83920
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB