# CVE-2026-54583: MidnightBSD mport path traversal in bundle filename handling

Source: https://junglewise.ai/threats/cve-2026-54583-midnightbsd-mport-path-traversal-in-bundle-filename-handling  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-17. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-54583 · Severity: info · Published 2026-09-17

mport is the package manager for MidnightBSD, a free operating system. Versions before 2.7.8 failed to properly validate bundle filenames from package indexes, allowing malicious package metadata to write downloaded packages outside their intended cache directory. This could enable attackers to overwrite arbitrary files on systems using mport to install packages.

Technologies: [MidnightBSD Mport](https://junglewise.ai/threats/technologies/mport). Vendors: [MidnightBSD](https://junglewise.ai/threats/vendors/midnightbsd).

## Quick answers

**Is CVE-2026-54583 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54583 being exploited in the wild.

**How severe is CVE-2026-54583?** Informational severity, published 17 September 2026.

**Which products and versions are affected?** MidnightBSD Mport before 2.7.8.

**Is there a fix for CVE-2026-54583?** A patch was published on 2026-05-15: Fix merged in pull request #125 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54583 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-54583?** Check whether you run MidnightBSD Mport at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a path traversal flaw in libmport/fetch.c where the is_valid_bundle_filename() validation was not consistently applied before using package bundle filenames from index data. An attacker controlling or poisoning a package index could inject malicious values (empty strings, dot, dot-dot, or paths containing slashes) into the bundlefile field, causing mport to write downloaded packages to arbitrary filesystem locations. This requires the package index to be compromised or the user to be directed to a malicious index. The fix, deployed in version 2.7.8, adds proper filename validation before download and file write operations.

## Affected products

- MidnightBSD mport before 2.7.8

## Timeline

- 2026-09-17: disclosed
- 2026-05-15: patched: Fix merged in pull request #125

## References

- [https://github.com/MidnightBSD/mport/commit/cad959d47bc79a62b6a7163800fbfe35633e7cf8](https://github.com/MidnightBSD/mport/commit/cad959d47bc79a62b6a7163800fbfe35633e7cf8)
- [https://github.com/MidnightBSD/mport/pull/125](https://github.com/MidnightBSD/mport/pull/125)

## Related threats

- [mport insecure TMPDIR usage in privileged contexts](https://junglewise.ai/threats/cve-2026-54584-mport-is-the-midnightbsd-package-manager-mport-before-2-7-8-used)
- [MidnightBSD mport directory traversal in package installation](https://junglewise.ai/threats/cve-2026-54587-midnightbsd-mport-directory-traversal-in-package-installation)
- [MidnightBSD mport HTTP package fetch without HTTPS enforcement](https://junglewise.ai/threats/cve-2026-54586-midnightbsd-mport-http-package-fetch-without-https-enforcement)
- [MidnightBSD mport path traversal in sample-file handling](https://junglewise.ai/threats/cve-2026-54585-midnightbsd-mport-path-traversal-in-sample-file-handling)
- [MidnightBSD mport file conflict check bypass](https://junglewise.ai/threats/cve-2026-54582-midnightbsd-mport-file-conflict-check-bypass)
