Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
Unrated

Path traversal in CPython tarfile.extractall() filter handling

IdentifiersCVE-2026-11940CWE-22

CVE-2026-11940 is a high-severity vulnerability in CPython’s tarfile module affecting tarfile.extractall() when used with the 'data' or 'tar' extraction filter. A crafted tar archive can bypass the intended extraction safeguards by using a hardlink that references a symlink stored at a deeper archived path than the hardlink itself. During extraction fallback handling, the symlink was validated at its archived location but recreated at the hardlink’s shallower path. This path mismatch allowed a relative link target that appeared confined during validation to resolve outside the intended extraction directory after recreation. As a result, a malicious archive could create a symlink pointing outside the destination directory. The issue is described as an incomplete fix for CVE-2025-4330.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker to escape the intended extraction directory and cause out-of-destination file reads or writes via a malicious tar archive. This can result in unauthorized access to files outside the extraction root, overwriting or creating files elsewhere on the filesystem subject to process privileges, and compromise of application integrity where untrusted archives are extracted.

Mitigation

If you can’t patch tonight, do this now.

Do not use tarfile.extractall() on untrusted archives until patched versions are deployed, including when using the 'data' or 'tar' filter. If untrusted extraction is unavoidable, reject archives containing symlinks and hardlinks, perform strict canonicalization and containment checks on every member path and link target as actually created on disk, and isolate extraction in a sandbox or dedicated environment with minimal filesystem privileges to limit impact.

Remediation

Patch, then assume compromise.

Upgrade to a Python/CPython release that includes the upstream fix for CVE-2026-11940, including the CPython patch referenced by the vendor advisory and associated pull request. Ensure all environments that process untrusted tar archives are updated to fixed builds. Because this issue is an incomplete fix of CVE-2025-4330, verify that deployed versions include the newer corrective changes rather than only the earlier fix.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PythonCpythonapplication
PythonPythonapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

ACTIVITY FEED

Recent activity

4 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity3

Community discussion across Reddit, Mastodon, and other social sources.