Skip to main content

MidnightBSD mport EUVDEUVD-2026-83920

| CVE-2026-54584 MEDIUM
External Control of File Name or Path (CWE-73)
2026-09-21 GitHub_M
5.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain local shell on MidnightBSD host
  2. Delivery
    Set malicious TMPDIR environment variable
  3. Exploit
    Trigger privileged/setuid mport package operation
  4. Execution
    Metadata extraction redirected to attacker path
  5. Impact
    Plant 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

mport < 2.7.8

Affected Packages

euvd mport fix: 2.7.8

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
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
vuln.today AI 2.5 LOW

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.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Sep 21, 2026 - 15:01 EUVD

DescriptionCVE.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

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Rare
MidnightBSD is an obscure FreeBSD fork with a tiny production footprint
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Mport

View all
CVE-2026-54580 HIGH
8.3 Sep 17

Package-index corruption and denial of package-management operations affect MidnightBSD mport before 2.7.8 when a malici

CVE-2026-54583 HIGH
8.3 Sep 17

Path traversal in the MidnightBSD mport package manager (libmport/fetch.c) before version 2.7.8 lets an attacker who con

CVE-2026-54581 HIGH
8.3 Sep 17

MidnightBSD's mport package manager prior to 2.7.8 can accept a tampered bootstrap package index as verified, because th

CVE-2026-54586 MEDIUM
6.0 Sep 17

On-path tampering with package-fetch traffic in MidnightBSD's mport package manager lets a network-positioned attacker s

CVE-2026-54585 MEDIUM
6.0 Sep 17

Path traversal in MidnightBSD mport before 2.7.8 allows a crafted package manifest to make the privileged sample-file ha

CVE-2026-54582 MEDIUM
6.0 Sep 17

Package file overwrite in MidnightBSD mport prior to 2.7.8 allows a crafted package installed with privileges to replace

CVE-2026-54575 MEDIUM
5.8 Sep 17

Path-racing and shell-invocation weaknesses in the MidnightBSD mport package manager (all versions prior to 2.7.8) let a

CVE-2026-54576 MEDIUM
5.8 Sep 17

Filesystem integrity compromise in MidnightBSD's mport package manager (versions prior to 2.7.8): a local user who alrea

CVE-2026-54587 MEDIUM
5.8 Sep 17

Symlink following and dot-dot path traversal in MidnightBSD mport prior to 2.7.8 lets a local attacker who can already w

CVE-2026-54579 LOW
2.3 Sep 17

Spoofed or injected ICMP echo replies can steer mport's mirror-latency selection toward an attacker-chosen mirror and, i

CVE-2026-54577 LOW
2.0 Sep 17

MidnightBSD's mport package manager, in all versions prior to 2.7.8, mis-parses the argument list for its 'audit' subcom

CVE-2026-54578 LOW
2.0 Sep 17

Checksum verification in MidnightBSD's mport package manager before 2.7.8 can silently continue after a hashing failure,

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy