Skip to main content

MidnightBSD mport CVE-2026-54585

| EUVDEUVD-2026-82323 MEDIUM
Path Traversal (CWE-22)
2026-09-17 GitHub_M
6.0
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious mport package with absolute sample-file path
  2. Delivery
    Deliver package to target (repo/download)
  3. Exploit
    Admin installs package as root
  4. Execution
    create_sample_file writes outside install root
  5. Persist
    Overwrite protected system file
  6. Impact
    Compromise 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.

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

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

Alert me

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

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

Vendor (GitHub_M) PRIMARY 6.0 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Sep 17, 2026 - 18:19 EUVD

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

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Rare
MidnightBSD is an obscure niche BSD fork with negligible enterprise 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.5%
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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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-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-54584 MEDIUM
5.3 Sep 21

MidnightBSD's mport package manager before 2.7.8 trusts the TMPDIR environment variable when extracting package metafile

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