Description
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.
Published: 2026-09-21
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Potential manipulation of package metadata extraction through environment-controlled temporary directories
Action: Patch immediately
AI Analysis

Impact

The vulnerability arises because mport uses the TMPDIR environment variable to locate temporary files used during package metadata extraction even when it runs with elevated privileges or as a setuid binary. This design flaw allows an attacker who can set environment variables for a privileged mport invocation to direct the extraction to an arbitrary directory controlled by the attacker. By doing so, the attacker can influence the location where sensitive metadata files are written, potentially enabling the placement of malicious content or the modification of files that are later processed during package installation. The flaw is identified as CWE-377 and CWE-73.

Affected Systems

MidnightBSD mport, the package manager for the MidnightBSD operating system, is affected. The issue exists in all releases prior to version 2.7.8. Both the pre‑2.7.8 and earlier stable series use the vulnerable TMPDIR handling in privileged contexts.

Risk and Exploitability

The CVSS score of 5.3 classifies the vulnerability as medium severity. The EPSS score is not available, indicating no publicly known exploit data, and the risk is not listed in the CISA KEV. The likely attack vector is local exploitation, requiring the attacker to control the environment for a privileged invocation of mport, such as through a compromised user session or by running mport with setuid permissions in a malicious environment. After patching to 2.7.8, the temporary directory is validated and any empty or unsafe TMPDIR values are rejected, removing the attack surface.

Generated by OpenCVE AI on September 21, 2026 at 16:08 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade MidnightBSD mport to version 2.7.8 or later, which validates TMPDIR in privileged contexts and rejects unsafe values.
  • If an upgrade cannot be performed immediately, ensure that no TMPDIR variable is set when running privileged mport, or set TMPDIR to a directory owned by a non‑privileged user that cannot be modified by the attacker.
  • Monitor system logs for abnormal package installation activity that could indicate tampering or suspicious file placement.

Generated by OpenCVE AI on September 21, 2026 at 16:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 21 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Midnightbsd
Midnightbsd mport
Vendors & Products Midnightbsd
Midnightbsd mport

Mon, 21 Sep 2026 14:30:00 +0000

Type Values Removed Values Added
Description 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.
Title mport trusts environment-controlled temporary directories in privileged metadata extraction
Weaknesses CWE-377
CWE-73
References
Metrics cvssV4_0

{'score': 5.3, 'vector': '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'}


Subscriptions

Midnightbsd Mport
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-25T19:23:13.124Z

Reserved: 2026-06-15T19:15:27.344Z

Link: CVE-2026-54584

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-09-21T15:17:29.107

Modified: 2026-09-25T20:17:08.070

Link: CVE-2026-54584

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-21T16:15:03Z

Weaknesses
  • CWE-377

    Insecure Temporary File

  • CWE-73

    External Control of File Name or Path