TARmageddon Vulnerability In Rust Library Let Attackers Replace Config Files And Execute Remote Codes
A vulnerability, identified as TARmageddon and tracked under CVE-2025-62518, has been discovered in the async-tar Rust library and its forks, including tokio-tar. This vulnerability, with a CVSS score of 8.1, classifies as high severity.
A vulnerability, identified as TARmageddon and tracked under CVE-2025-62518, has been discovered in the async-tar Rust library and its forks, including tokio-tar. This vulnerability, with a CVSS score of 8.1, classifies as high severity.
The flaw allows for manipulation of TAR archive parsing, which can lead to the overwriting of critical files such as configuration scripts, potentially resulting in remote code execution (RCE) on affected systems.
Edra reports that the vulnerability arises from a boundary-parsing error related to nested TAR files when PAX extended headers conflict with ustar headers. The parser may incorrectly skip actual file data due to a misleading zero-byte size in the ustar header, ignoring the correct size in the PAX header. This can allow for hidden entries from inner archives to overwrite files in the target directory.
Prominent projects like the uv Python package manager, testcontainers, and wasmCloud face risks due to the widespread use of tokio-tar within the Rust ecosystem , with millions of downloads potentially affected.
This vulnerability, with a CVSS score of 8.1, classifies as high severity.
Addressing TARmageddon was challenging due to tokio-tar's lack of active maintenance, absence of a SECURITY.md file, and limited contact information. Edera coordinated a decentralized patching effort across forks, from async-tar to tokio-tar, and beyond, including astral-tokio-tar.
Patches were developed and shared under a 60-day embargo starting Tue, Aug 21, 2025, targeting downstream projects like binstalk and opa-wasm. While some projects integrated the fix, others planned to remove the dependency, leaving some users exposed. The original tokio-tar and async-tar remain unpatched, necessitating manual updates. Edera recommends upgrading to patched versions or removing the dependency, with astral-tokio-tar suggested as an alternative.
The patch prioritizes PAX header size checks, ensures header consistency, and introduces boundary safeguards to prevent misalignment. Interim solutions include using the synchronous tar crate or implementing runtime checks such as manifest validation and sandboxed extractions.
The vulnerability highlights Rust's limitations in preventing logic flaws in unmaintained code. The 60-day timeline from discovery to coordinated release emphasizes the challenges in ecosystems with multiple forks. Edera emphasizes the need for improved maintenance signals and proactive forking in open-source projects.
Based on reporting by Cyber Security News.
