{"id":"CVE-2026-54585","summary":"mport sample file handling can write outside the configured root","details":"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-\u003eroot. 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.","aliases":["GHSA-xqjc-rxmm-p27v"],"modified":"2026-09-19T08:08:53.836402Z","published":"2026-09-17T16:52:33.109Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54585.json"},"references":[{"type":"WEB","url":"https://github.com/MidnightBSD/mport/releases/tag/2.7.8"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54585.json"},{"type":"ADVISORY","url":"https://github.com/MidnightBSD/mport/security/advisories/GHSA-xqjc-rxmm-p27v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54585"},{"type":"FIX","url":"https://github.com/MidnightBSD/mport/commit/36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0"},{"type":"FIX","url":"https://github.com/MidnightBSD/mport/pull/122"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/midnightbsd/mport","events":[{"introduced":"0"},{"fixed":"36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0"},{"fixed":"899c8fe2d3ceb25d899e70dbd0c7744b7d7a0946"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"2.7.8"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"versions":["2.7.6","2.7.5","2.7.4","2.7.3","2.7.2","2.7.1","2.7.0","2.6.8","2.6.7","2.6.5","2.6.4","2.6.3","2.6.2","2.6.1","2.6.0","2.5.1","2.5.0","2.4.8","2.4.7","2.4.6","2.4.5","2.4.4","2.4.3","2.4.1","2.4.0","2.3.0","2.2.9.1","2.2.9","2.2.8","2.2.7","2.2.6","2.2.5","2.2.4","2.2.3","2.2.2","2.2.1","2.2.0","2.1.9","2.1.8","2.1.7","2.1.6","2.1.5","2.1.4","2.1.3","2.1.2","2.1.1","2.1.0","2.0.9","2.0.8","2.0.7","2.0.6","2.0.5","2.0.2","2.0.1","2.0"],"database_specific":{"vanir_signatures_modified":"2026-09-19T08:08:53Z","vanir_signatures":[{"id":"CVE-2026-54585-341cd73a","signature_type":"Line","signature_version":"v1","source":"https://github.com/midnightbsd/mport/commit/36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0","target":{"file":"libmport/bundle_read_install_pkg.c"},"deprecated":false,"digest":{"line_hashes":["236029657467675296629030037393227001166","260839329948985946908815546951352072992","306309436848299513975217031919783395689","220026163161831257632691399852254961875","338848387342946539516354401943299562244","129514344371739286279638810802721641975","47537408416916947704041599510808272154","291508972028700745498570652367299301934"],"threshold":0.9}},{"signature_version":"v1","source":"https://github.com/midnightbsd/mport/commit/36a42c8ddbd23ee9eb72c4c17596eb92cb423cf0","target":{"file":"libmport/bundle_read_install_pkg.c","function":"create_sample_file"},"deprecated":false,"digest":{"length":1066,"function_hash":"319263696170093865883928250513563263123"},"id":"CVE-2026-54585-e78fda46","signature_type":"Function"}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54585.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}