Skip to main content

CVE-2026-54576: CWE-59: Improper Link Resolution Before File Access ('Link Following') in MidnightBSD mport

0
Medium
VulnerabilityCVE-2026-54576cvecve-2026-54576cwe-59cwe-367
Published: 09/17/2026 (09/17/2026, 16:58:25 UTC)
Source: CVE Database V5
Vendor/Project: MidnightBSD
Product: mport

Description

CVE-2026-54576 is a vulnerability in the MidnightBSD package manager 'mport' prior to version 2.7.8. The issue involves improper link resolution before file access during package installation, allowing a local attacker with write access to a target directory to replace files with symbolic links. This can cause privileged ownership or mode changes to be applied to unintended paths, potentially compromising filesystem integrity or permissions. The vulnerability is fixed in version 2.7.8.

CVSS v4.0

Score 5.8medium

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

MidnightBSD

mport

Affected versions
<2.7.8
GitHub Actionsmore threats →ai
midnightbsd/mport
pkg:github/midnightbsd/mport
Affected versions
<2.7.8

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/17/2026, 22:15:01 UTC

Technical Analysis

The vulnerability in mport versions before 2.7.8 arises from the use of path-based lstat(), chown(), stat(), and chmod() system calls in the do_actual_install() function during package installation. Because these operations do not securely handle symbolic links, a local attacker with write permissions in the target directory can substitute a file with a symlink after the initial checks but before ownership or permission changes are applied. This allows the attacker to redirect these privileged changes to arbitrary filesystem locations, risking unauthorized modification of file ownership or permissions. The issue is addressed by fixes introduced in mport version 2.7.8.

Potential Impact

A local attacker with write access to the target directory can exploit this vulnerability to redirect privileged ownership and permission changes to attacker-controlled paths. This can lead to compromised filesystem integrity or unauthorized permission escalation on files outside the intended package installation scope. The vulnerability requires local access and write permissions, and the attack complexity is high due to timing requirements.

Mitigation Recommendations

Upgrade mport to version 2.7.8 or later, where this vulnerability is fixed. No other mitigation is necessary as the issue is resolved in the official patch.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-15T19:15:27.343Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6aac65bf55bf5e2cf5fdf656

Added to database: 09/17/2026, 22:12:15 UTC

Last enriched: 09/17/2026, 22:15:01 UTC

Last updated: 09/18/2026, 01:52:38 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses