I Never Thought I’d See This
Quick Overview
The critical "Tarmageddon" RCE vulnerability (CVE-2025-62518) in the abandoned Rust library tokio-tar exposes fundamental challenges in open-source supply chain security, allowing attackers to smuggle hidden, nested tar archives that security scanners miss, leading to potential Remote Code Execution by tricking parsers into reading the wrong file sizes and overwriting legitimate files like pyproject.toml.
Key Points: The vulnerability, CVE-2025-62518, stems from a parsing inconsistency in the abandoned Rust library tokio-tar when handling PAX headers, which leads to incorrect file size reading within tar archives. Attackers exploit this by embedding a hidden, malicious tar archive inside a legitimate outer tar archive, causing parsers to misalign their position and skip reading correct file headers. This flaw enables archive smuggling, allowing malicious files (like those designed for Python build backend hijacking) to overwrite legitimate configuration files, such as pyproject.toml, leading to RCE. The Edera team provided patches for related libraries, astral-tokio-tar and krata-tokio-tar, and the fix involves prioritizing PAX headers for size determination and implementing strict boundary checking. The vulnerability highlights that even memory-safe languages like Rust are susceptible to logic bugs and supply chain risks stemming from unmaintained open-source dependencies. Flare, the sponsor, actively collects nearly 10 million security events daily from the dark web, offering threat exposure management to users.
Context: The video discusses the critical RCE vulnerability tracked as CVE-2025-62518, dubbed "Tarmageddon," which affected the 'tokio-tar' Rust library. This library, used for asynchronous TAR file reading/writing, was found to have a flaw in how it processed TAR headers, specifically concerning PAX and ustar size fields, which is exacerbated by the library being abandonware. The presenter details how this flaw can be weaponized to smuggle malicious content past security tools.