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 CPython's tarfile.extractall() function involves an attacker crafting a tar archive where a hardlink points to a symlink located deeper in the archive. During extraction, the fallback validation checks the symlink at its archived location but recreates it at the hardlink's shallower path. This allows a relative symlink target to escape the destination directory filter, enabling out-of-directory file reads or writes. This vulnerability is classified under CWE-22 (Path Traversal) and CWE-59 (Link Following) and represents an incomplete fix of CVE-2025-4330.
Potential Impact
An attacker can craft a malicious tar archive that, when extracted using tarfile.extractall(), can create symlinks pointing outside the intended extraction directory. This can lead to unauthorized file reads or writes outside the destination directory, potentially compromising system integrity or confidentiality.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid extracting untrusted tar archives using tarfile.extractall() 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
Python Software Foundation
CPython
pkg:github/CPythonRun 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 CPython's tarfile.extractall() function involves an attacker crafting a tar archive where a hardlink points to a symlink located deeper in the archive. During extraction, the fallback validation checks the symlink at its archived location but recreates it at the hardlink's shallower path. This allows a relative symlink target to escape the destination directory filter, enabling out-of-directory file reads or writes. This vulnerability is classified under CWE-22 (Path Traversal) and CWE-59 (Link Following) and represents an incomplete fix of CVE-2025-4330.
Potential Impact
An attacker can craft a malicious tar archive that, when extracted using tarfile.extractall(), can create symlinks pointing outside the intended extraction directory. This can lead to unauthorized file reads or writes outside the destination directory, potentially compromising system integrity or confidentiality.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid extracting untrusted tar archives using tarfile.extractall() 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
Threat ID: 6a3ab6d7eed863c81e4f98ee
Added to database: 06/23/2026, 16:39:51 UTC
Last enriched: 08/12/2026, 13:40:46 UTC
Last updated: 09/22/2026, 19:16:08 UTC
Views: 571
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.