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).

Exploitability

The vulnerability can be exploited by crafting a malicious TAR file containing PAX headers with file size overrides where the PAX header correctly specifies the actual file size while the ustar header incorrectly specifies zero size. This mismatch creates a parsing inconsistency that allows attackers to smuggle additional archives when the library processes nested TAR files (Edera Blog, GitHub Advisory).

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

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

sid

rust-astral-tokio-tar: 0.5.6-1

Fixed

trixie

rust-astral-tokio-tar

Affected

Ubuntu

Unknown

devel

rust-astral-tokio-tar

Not Affected

resolute

rust-astral-tokio-tar

Unknown

resolute (esm-apps)

rust-astral-tokio-tar

Unknown

RHEL / CentOS

Affected

OpenShift

kata-containers.src

Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

Source: This report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-35m9-986f-rhmhHIGH7.4
  • Rust logoRust
  • auth-framework
NoYesOct 27, 2026
GHSA-9ghr-c83r-gf47MEDIUM4.4
  • Rust logoRust
  • auth-framework
NoYesOct 27, 2026
GHSA-j3jp-m26x-5952LOW3.7
  • Rust logoRust
  • auth-framework
NoYesOct 27, 2026
GHSA-44fv-ww3r-9p4fLOW3.7
  • Rust logoRust
  • auth-framework
NoYesOct 27, 2026
GHSA-jh2m-fhpj-3vr7HIGHN/A
  • Rust logoRust
  • rustix
NoNoOct 27, 2026

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

Additional Wiz resources

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