CVE-2025-62518
Rust vulnerability analysis and mitigation

Overview

CVE-2025-62518, dubbed TARmageddon, is a high-severity vulnerability (CVSS score: 8.1) discovered in August 2025 affecting the async-tar Rust library and its forks, including tokio-tar. The vulnerability impacts several widely-used projects such as uv (Astral's Python package manager), testcontainers, and wasmCloud. The flaw exists in versions of astral-tokio-tar prior to 0.5.6, allowing attackers to smuggle additional archive entries by exploiting inconsistent PAX/ustar header handling (Hacker News, Edera Blog).

Technical details

The vulnerability stems from inconsistent handling of PAX extended headers versus ustar headers when determining file data boundaries. When processing archives with PAX-extended headers containing size overrides, the parser incorrectly advances stream position based on ustar header size (often zero) instead of the PAX-specified size, causing it to interpret file content as legitimate tar headers. This leads to a parsing inconsistency where the parser's internal position becomes misaligned, causing it to treat headers and data from a hidden, nested archive as part of the primary archive's entry list (Edera Blog, GitHub Advisory).

Impact

In the worst-case scenario, this vulnerability can lead to Remote Code Execution (RCE) through file overwriting attacks, such as replacing configuration files or hijacking build backends. The impact is particularly severe in scenarios involving Python package managers, container testing frameworks, and systems with separate scan/approve versus extract/deploy phases. The vulnerability could enable attackers to perform file overwriting attacks within extraction directories, supply chain attacks via build system and package manager exploitation, and bill-of-materials (BOM) bypass for security scanning (Edera Blog).

Mitigation and workarounds

The vulnerability has been patched in astral-tokio-tar version 0.5.6. Users are advised to immediately upgrade to the patched version or remove the dependency. For those depending on tokio-tar, migration to the actively maintained fork astral-tokio-tar is recommended. Alternative workarounds include using the standard tar crate (non-async) which correctly handles this scenario, implementing post-extraction directory scanning to detect unexpected files, and using separate extraction sandboxes with file count/size limits (Edera Blog, GitHub Advisory).

Community reactions

The disclosure of TARmageddon highlighted a major systemic challenge in the open-source ecosystem, particularly regarding abandonware. The most popular fork, tokio-tar, with over 5 million downloads on crates.io, appears to be no longer actively maintained. This led to a unique coordinated disclosure process across multiple forks and downstream projects. The security community emphasized that while Rust's guarantees make it harder to introduce memory safety bugs, it does not eliminate logic bugs, and developers must remain vigilant against all classes of vulnerabilities (Edera Blog).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-62518HIGH8.1
  • RustRust
  • rust-astral-tokio-tar
NoYesOct 21, 2025
GHSA-fp5x-7m4q-449fLOW2
  • RustRust
  • direct_ring_buffer
NoYesOct 21, 2025
GHSA-h5j3-crg5-8jqmLOW2
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 2025
RUSTSEC-2025-0107N/AN/A
  • RustRust
  • borrowck_sacrifices
NoYesOct 21, 2025
RUSTSEC-2025-0106N/AN/A
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management