Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-54582— mport package installation can overwrite existing unmanaged or differently owned files

Quick assessment

Affected
MidnightBSD mport
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

是 MidnightBSD 的包管理器。在版本 2.7.8 之前,包安装过程中缺少对已存在于磁盘上的非目录资产(如普通文件)的预检查。受影响的逻辑位于 、 和 中,这些代码未应用 检查,因此,经过构造或存在冲突的包可能会覆盖由其他包拥有或未被 管理的文件。该检查仅在操作者显式启用 时被绕过。若未设置该强制覆盖选项,而执行具有特权的安装操作,可能会破坏本地文件系统完整性以及包数据库的一致性。此问题已在版本 2.7.8 中修复。

CVSS 6.0 · Medium

Affected Version Matrix 1

VendorProduct Version RangeStatus
MidnightBSD mport < 2.7.8 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-54582

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
mport package installation can overwrite existing unmanaged or differently owned files
Source: CVE Program / CVE List V5
Vulnerability Description
mport is the MidnightBSD Package Manager. Prior to 2.7.8, package installation lacked a preflight check for incoming non-directory assets that already existed on disk. The affected logic across libmport/check_preconditions.c, libmport/install_primative.c, and libmport/mport_private.h did not apply MPORT_PRECHECK_FILE_CONFLICTS, so a crafted or conflicting package could overwrite a file owned by another package or unmanaged by mport. The check is bypassed only when the operator explicitly enables mport->force. Privileged installation without that override could compromise local filesystem integrity and package database consistency. This issue is fixed in version 2.7.8.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
文件名或路径的外部可控制
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
MidnightBSD mport < 2.7.8 -

II. Public POCs for CVE-2026-54582

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-54582

登录查看更多情报信息。

Patches & Fixes for CVE-2026-54582 (2)

Vendor Advisories for CVE-2026-54582 (1)

Other References for CVE-2026-54582 (1)

Same Patch Batch · MidnightBSD · 2026-09-17 · 12 CVEs total

CVE-2026-54583 8.3 HIGH mport package bundle downloads allow unsafe destination filenames
CVE-2026-54581 8.3 HIGH mport bootstrap index fetch can continue after hash verification failure
CVE-2026-54580 8.3 HIGH mport index decompression can leave partial or corrupt index data after zstd failures
CVE-2026-54585 6.0 MEDIUM mport sample file handling can write outside the configured root
CVE-2026-54586 6.0 MEDIUM mport permits repository and package mirror fetches over insecure transport
CVE-2026-54587 5.8 MEDIUM mport directory asset installation is vulnerable to symlink and path traversal races
CVE-2026-54576 5.8 MEDIUM mport package installation has symlink TOCTOU in chown and chmod handling
CVE-2026-54575 5.8 MEDIUM mport package fetch and clean paths are vulnerable to TOCTOU filesystem races
CVE-2026-54579 2.3 LOW mport mirror-selection ping accepts insufficiently validated ICMP replies
CVE-2026-54577 2.0 LOW mport audit can inspect the wrong package when options are present
CVE-2026-54578 2.0 LOW mport verify can compare stale checksum data after hashing failures

IV. Related Vulnerabilities

V. Comments for CVE-2026-54582

No comments yet


Leave a comment