CVE-2026-54576 PUBLISHED

mport package installation has symlink TOCTOU in chown and chmod handling

Assigner: GitHub_M
Reserved: 15.06.2026 Published: 17.09.2026 Updated: 17.09.2026

mport is the MidnightBSD Package Manager. Prior to 2.7.8, do_actual_install() in libmport/bundle_read_install_pkg.c used path-based lstat(), chown(), stat(), and chmod() operations while installing package files. A local attacker with write access to a target directory could replace a checked file with a symlink before privileged ownership or mode changes were applied, redirecting those changes to an attacker-selected path and compromising filesystem integrity or permissions. This issue is fixed in version 2.7.8.

Metrics

CVSS Vector: 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
CVSS Score: 5.8

Product Status

Vendor MidnightBSD
Product mport
Versions
  • Version < 2.7.8 is affected

References

Problem Types

  • CWE-59: Improper Link Resolution Before File Access ('Link Following') CWE
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition CWE