# CVE-2026-54585: mport sample file handling can write outside the configured root

- Severity: Medium 6.0 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2026-09-17T16:52:33.109Z
- Modified: 2026-09-17T21:15:06.427Z
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- MidnightBSD mport: < 2.7.8

## References

- <https://github.com/MidnightBSD/mport/security/advisories/GHSA-xqjc-rxmm-p27v>
- <https://github.com/MidnightBSD/mport/pull/122>
- <https://github.com/MidnightBSD/mport/commit/36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0>
- <https://github.com/MidnightBSD/mport/releases/tag/2.7.8>

## Sources

- CVE List: [CVE-2026-54585](https://www.cve.org/CVERecord?id=CVE-2026-54585), CVE Terms of Use, modified 2026-09-17
- NVD: [CVE-2026-54585](https://nvd.nist.gov/vuln/detail/CVE-2026-54585), Public domain, modified 2026-09-17

---

Page: https://cve.day/CVE-2026-54585 · Whole record: https://cve.day/CVE-2026-54585.json · Rebuilt by cve.day 2026-11-25T22:59:39.282Z
