CVE-2026-11940: CWE-22 in Python Software Foundation CPython
tarfile.extractall() with the 'data' or 'tar' filter could be bypassed by a crafted archive where a hardlink references a symlink stored at a deeper name than the hardlink itself. The extraction fallback validated the symlink at it's archived location but recreated it at the hardlink's shallower path, letting a relative target the filter judged contained escape the destination directory. This allowed a malicious tar archive to create a symlink pointing outside the destination, enabling out-of-destination file reads or writes. This was an incomplete fix of CVE-2025-4330.
AI Analysis
Technical Summary
The vulnerability in Python's CPython tarfile.extractall() arises when extracting tar archives with the 'data' or 'tar' filter. A malicious archive can include a hardlink that references a symlink located at a deeper path than the hardlink itself. During extraction, the fallback validation checks the symlink at its archived location but recreates it at the shallower hardlink path. This discrepancy allows a relative symlink target to escape the destination directory, potentially permitting out-of-directory file system access. This flaw represents an incomplete remediation of CVE-2025-4330.
Potential Impact
Exploitation of this vulnerability can allow an attacker to create symlinks during archive extraction that point outside the intended destination directory. This can lead to unauthorized file reads or writes outside the extraction path, potentially compromising system integrity or confidentiality. The CVSS 4.0 score of 7.8 (high severity) reflects the network attack vector with no privileges or user interaction required, and high scope impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, avoid extracting untrusted tar archives using tarfile.extractall() with the 'data' or 'tar' filter, or apply manual validation of archive contents to prevent directory traversal via symlinks and hardlinks.
CVE-2026-11940: CWE-22 in Python Software Foundation CPython
Description
tarfile.extractall() with the 'data' or 'tar' filter could be bypassed by a crafted archive where a hardlink references a symlink stored at a deeper name than the hardlink itself. The extraction fallback validated the symlink at it's archived location but recreated it at the hardlink's shallower path, letting a relative target the filter judged contained escape the destination directory. This allowed a malicious tar archive to create a symlink pointing outside the destination, enabling out-of-destination file reads or writes. This was an incomplete fix of CVE-2025-4330.
CVSS v4.0
Score 7.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Python's CPython tarfile.extractall() arises when extracting tar archives with the 'data' or 'tar' filter. A malicious archive can include a hardlink that references a symlink located at a deeper path than the hardlink itself. During extraction, the fallback validation checks the symlink at its archived location but recreates it at the shallower hardlink path. This discrepancy allows a relative symlink target to escape the destination directory, potentially permitting out-of-directory file system access. This flaw represents an incomplete remediation of CVE-2025-4330.
Potential Impact
Exploitation of this vulnerability can allow an attacker to create symlinks during archive extraction that point outside the intended destination directory. This can lead to unauthorized file reads or writes outside the extraction path, potentially compromising system integrity or confidentiality. The CVSS 4.0 score of 7.8 (high severity) reflects the network attack vector with no privileges or user interaction required, and high scope impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, avoid extracting untrusted tar archives using tarfile.extractall() with the 'data' or 'tar' filter, or apply manual validation of archive contents to prevent directory traversal via symlinks and hardlinks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-06-10T19:50:59.923Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3ab6d7eed863c81e4f98ee
Added to database: 06/23/2026, 16:39:51 UTC
Last enriched: 08/05/2026, 13:10:47 UTC
Last updated: 08/08/2026, 00:41:10 UTC
Views: 435
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.