Security researchers at Edera have disclosed a critical logic flaw in the abandoned Rust library async‑tar and multiple forks, including the widely used tokio‑tar. Tracked as CVE‑2025‑62518 and dubbed TARmageddon, the vulnerability allows an unauthenticated attacker to inject arbitrary records into a TAR archive stream during extraction, which can lead to remote code execution (RCE) in downstream workflows. The risk is amplified by the library’s extensive reuse across the Rust ecosystem and transitive dependencies.
How the TARmageddon exploit works: PAX/ustar header desynchronization
The flaw is triggered when processing nested TAR archives that contain conflicting metadata between the classic ustar header and PAX extended headers. Due to a parser bug, the extractor becomes desynchronized: it “jumps” into the file data region, misinterprets crafted bytes as valid TAR headers, and proceeds to unpack attacker‑controlled pseudo‑entries.
In practical terms, this enables silent file injection during extraction. An attacker can overwrite build artifacts and configuration files, plant scripts, or introduce malicious configuration in a way that later stages of a build or deployment pipeline may execute—creating viable paths to RCE. This behavior is particularly dangerous in supply chain contexts, where artifact extraction is often automated in CI/CD and build systems.
Scope and affected projects across the Rust ecosystem
Beyond the original async‑tar, the most prominent vulnerable fork is tokio‑tar, which, according to researchers, has more than 7 million downloads on crates.io and is also unmaintained. While several active forks have shipped fixes, the true blast radius remains difficult to determine given the number of derivatives and transitive dependencies.
Known impacted tools and ecosystems include Binstalk, Astral’s Python package manager uv, wasmCloud, liboxen, and the testcontainers library. Some teams have announced migrations to patched forks or removal of the vulnerable dependency; others have not yet responded and may remain exposed.
Maintainer coordination and patch status
Edera reports that coordinated disclosure was hampered by missing SECURITY.md policies and a lack of public contact channels, requiring community outreach and escalation to reach maintainers. Patches have been released for async‑tar and astral‑tokio‑tar, but the most widely used tokio‑tar remains unpatched.
Organizations are advised to remove tokio‑tar and migrate to maintained alternatives. Edera recommends astral‑tokio‑tar as a safe replacement (fork lineage: edera‑dev/tokio‑tar → vorot93/tokio‑tar → dignifiedquire/async‑tar → alexcrichton/tar‑rs). Edera’s own fork (krata‑tokio‑tar) is being archived to avoid further fragmentation.
Supply chain and CI/CD risk scenarios
High‑risk scenarios include automated extraction of untrusted or third‑party TAR archives pulled from external registries, caches, or build artifacts. If malicious entries are injected during extraction, they can alter build scripts, configuration files, or embedded binaries, potentially compromising build agents, poisoning outputs, and propagating malicious code downstream through the software supply chain.
Mitigation guidance and detection strategies
Actions for developers
- Migrate dependencies: Replace tokio‑tar with a patched fork such as astral‑tokio‑tar, or remove the dependency entirely where feasible. Pin versions and regenerate lock files.
- Audit your SBOM: Use software composition analysis (SCA) tools to inventory direct and transitive dependencies. Blocklisted packages and branches should be enforced in policy.
- Harden extraction: Do not auto‑extract untrusted archives. Extract in isolated directories or containers with least privilege; disable executable permissions by default and restrict symlink resolution and nested archives.
- Integrity controls: Verify cryptographic signatures and hashes of artifacts. Apply allowlists for sources and artifact types.
Actions for security teams
- Inventory and monitoring: Search codebases, build images, and artifact pipelines for async‑tar/tokio‑tar, including transitive pulls. Monitor for new forks and mirrors that reintroduce the flaw.
- CI/CD policies: Enforce integrity checks, run extraction in a sandbox, and alert on anomalous unpack behavior (for example, unexpected new entries during extraction of known artifacts).
- Incident response: If exploitation indicators are found, rotate secrets, rebuild artifacts from trusted sources, and perform forensics on build agents and runners.
The TARmageddon case highlights a systemic issue: critical yet unmaintained libraries can persist in supply chains for years. Reducing RCE risk requires prompt migration to patched forks, disabling automatic extraction of untrusted archives, and enforcing strict integrity and sandboxing policies in CI/CD. Act now to minimize exposure and prevent downstream compromise.