CVE-2025-62518
Rust vulnerability analysis and mitigation

Overview

CVE-2025-62518, dubbed TARmageddon, is a high-severity boundary parsing vulnerability discovered in August 2025 affecting the astral-tokio-tar Rust library and its forks. The vulnerability allows attackers to smuggle additional archive entries by exploiting inconsistent PAX/ustar header handling in versions prior to 0.5.6. The flaw impacts several widely-used projects, including testcontainers and wasmCloud (Hacker News, GitHub Advisory).

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. The vulnerability has a CVSS score of 8.1 (High) and is classified under CWE-843 (Type Confusion) (GitHub Advisory, Edera Blog).

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 when the library is used to extract untrusted tar archives, potentially resulting in unexpected attacker-controlled access to the filesystem and credential exfiltration (GitHub Advisory, Hacker News).

Mitigation and workarounds

Users are advised to upgrade to astral-tokio-tar version 0.5.6 or newer, which includes the patch for this vulnerability. There are no workarounds other than upgrading. The fix involves modifying the TAR parser to prioritize PAX headers for size determination over ustar headers and implementing strict boundary checking to prevent data/header confusion (GitHub Advisory).

Community reactions

The security community has noted that while Rust's guarantees make it significantly harder to introduce memory safety bugs, it does not eliminate logic bugs, and this parsing inconsistency is fundamentally a logic flaw. The problem is compounded by the fact that tokio-tar is essentially abandonware despite attracting thousands of downloads via crates.io (Hacker News, 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-66627HIGH8.4
  • RustRust
  • wasmi
NoYesDec 09, 2025
GHSA-xrv8-2pf5-f3q7MEDIUM6
  • RustRust
  • nitro-tpm-pcr-compute
NoYesDec 05, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 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