ZeroHour

CVE-2026-82049

mass

Python tarfile extraction filter bypass via hard link to symlink (CPython ≤3.13)

CVSS 4.0
8.4 high
EPSS
Published
()
Modified
AI analysis

A link-following flaw (CWE-59) in CPython's tarfile module lets a crafted tar archive containing a hard link that points to a symbolic link defeat the 'data' and 'tar' extraction filters introduced to harden tarfile. If an application extracts such an attacker-supplied archive, extraction can follow the link chain and change the permissions or modification time of a file outside the intended destination directory, or copy the contents of that outside file into the extracted tree (information disclosure). Exploitation requires a victim or application to extract a malicious archive (CVSS 4.0 lists user interaction), so the practical risk is concentrated in software that unpacks untrusted tars: package mirrors, build/CI tooling, backup and restore agents, and file-upload pipelines. All CPython releases 3.13 and earlier are affected. No public proof of concept or in-the-wild exploitation is known at this time.

What to do: Upgrade to the latest Python maintenance release for each affected branch as soon as the fix is published, and check your Linux distribution or vendor (including macOS system Python) for patched packages. Audit first- and third-party code that calls tarfile.extract/extractall on user- or network-supplied archives and treat those inputs as untrusted in the meantime. As an interim mitigation, pre-scan archive members and reject or neutralize hard links whose target resolves to a symlink, and run extraction in a sandbox or with a low-privilege account to limit blast radius.

Affected
Python Software Foundation CPython (Python)3.13 and earlier (including the 3.13.x, 3.12.x, 3.11.x and older series; fixed only in releases containing the tarfile filter patch)
Estimated exposure
massPotentially >100 million systems, since Python 3 is preinstalled on most Linux distributions and macOS, though only the subset running code that extracts… — Python ships as a default component of virtually every mainstream Linux distribution and macOS, so the installed base plausibly exceeds 100M devices; actual vulnerable usage depends on applications calling tarfile extraction on untrusted…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In CPython 3.13 and earlier, the tarfile module's data and tar extraction filters are vulnerable to crafted archives containing a hard link to a symbolic link. Such archives may cause extraction to modify the permissions or modification time of a file outside the destination directory, or expose the contents of that file within the extracted tree.

Weakness
CWE-59
Vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

Cpython: [CVE-2026-82049] tarfile extraction filters allow file modification and content disclosure via hard link to symlink

Python discloses CVE-2026-82049: tarfile extraction filters can be bypassed via hard links to symlinks, enabling file modification and content disclosure.

Stan Ulbrych disclosed CVE-2026-82049 on the Python security-announce list, forwarded to oss-security by Alan Coopersmith. The flaw affects CPython's tarfile extraction filters, which can allow file modification and content disclosure when archives contain a hard link to a symlink. Extraction-filter misuse can therefore bypass intended protections during archive unpacking.

oss-security · 1d agoVulnerabilityCVE-2026-82049