TARmageddon in astral-tokio-tar
CVE-2025-62518, dubbed TARmageddon, is a boundary-parsing vulnerability in astral-tokio-tar, an async Rust TAR archive reading/writing library. In versions prior to 0.5.6, the parser mishandles TAR archives that use PAX extended headers with size overrides alongside inconsistent ustar headers. Specifically, when a PAX header specifies the effective file size but the corresponding ustar header contains a different size value, often zero, the parser advances the stream based on the ustar size instead of the PAX-resolved size. This desynchronizes archive parsing and can cause file content from a nested or crafted TAR member to be reinterpreted as subsequent legitimate TAR headers, effectively allowing an attacker to smuggle additional archive entries into processing. The issue is part of the broader async-tar/tokio-tar lineage vulnerability publicly referred to as TARmageddon.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos.
Repository is a Rust proof-of-concept for “TARmageddon” (CVE-2025-62518) affecting the `tokio-tar` crate’s handling of PAX extended headers. Structure/purpose: - `malicious-payload/` (Rust crate): Generates a crafted `malicious.tar` using the `tar` crate. The generator writes a PAX extended header that sets `size=1024` for the next file, then writes a USTAR header for `benign_file.txt` with size set to `0`. It then places a second, valid TAR header for `sh_profile_hijack` inside what should be the benign file’s data region, followed by the smuggled content (`alias ls='rm -rf /'\n`) and proper 512-byte padding and EOF blocks. - `vulnerable-extract/` (Rust crate): Minimal async extractor using `tokio-tar = 0.3.1` that unpacks a user-supplied TAR into `./output`. This demonstrates the vulnerable behavior: the library uses the PAX size for reading content but uses the USTAR size for advancing to the next header, causing a parser/content pointer mismatch and interpreting embedded data as a new header. - `reproduce.sh`: Automates building the payload, showing that GNU tar lists only the benign file, then running the vulnerable extractor to show the extra smuggled file appears in `output/`. Exploit capability: - Not a network exploit; it is a malicious archive that, when processed by vulnerable `tokio-tar`, results in additional attacker-controlled files being written to disk that may evade naive archive inspection/scanning. This can enable supply-chain/CI poisoning or security-tool bypass scenarios where inspection uses correct TAR semantics but extraction uses the vulnerable parser.
This repository is a comprehensive, multi-language proof-of-concept for CVE-2025-62518, a critical vulnerability in several Rust async tar libraries (tokio-tar, async-tar, krata-tokio-tar, astral-tokio-tar) related to improper handling of PAX extended header size overrides. The exploit is implemented as a full test suite and reproduction harness: - The core exploit is a specially crafted tar archive (pax_bug_compact.tar) generated by repro_generator/repro_generator.cpp. This archive contains a PAX header specifying a large file size, but a ustar header with size zero, and file content that begins with a valid tar header for a nested file. - The repository includes C++ tools (tarwalk.cpp, tarwalk_bad.cpp) to analyze and compare correct vs buggy parsing behavior, and a Rust tool (tar-bug-detector) to compare the behavior of different tar libraries. - The exploit demonstrates that vulnerable libraries will misinterpret file content as new archive entries, allowing attackers to smuggle or overwrite files during extraction, bypassing manifest validation and potentially leading to code execution or supply chain attacks. - The repository also contains detailed disclosure documentation, technical analysis, and patches for affected libraries. No network endpoints or remote services are involved; the attack is local and targets archive extraction logic, but the impact is significant for supply chain and build systems that process untrusted tar files.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
77 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A remotely exploitable vulnerability (described as an RCE case study) associated with the Rust async-tar ecosystem, used as an example of abandonware risk in widely used dependencies.
A remote code execution vulnerability in the tokio-tar library (TARmageddon), complicated by the project's abandonware status, requiring decentralized patching across forks.
A remote code execution vulnerability in the async-tar Rust library (and forks) caused by inconsistent TAR (PAX/ustar) header parsing that can allow hidden archive entries, enabling file overwrite and potential code execution/supply-chain impact.
A boundary-parsing flaw in the Rust async-tar ecosystem (including tokio-tar) that can enable file overwrite leading to potential remote code execution (RCE).
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.