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
CVE-2026-11940 is a path traversal vulnerability in the tarfile.extractall() function of Python CPython versions before 3.16.0. The vulnerability arises when a malicious tar archive uses a hardlink referencing a symlink located deeper in the archive. The extraction fallback incorrectly validates the symlink at its archived location but recreates it at the hardlink's shallower path, allowing a relative symlink target to escape the intended extraction directory. This flaw can lead to unauthorized file system access outside the destination directory during archive extraction. It represents an incomplete fix of the earlier CVE-2025-4330 vulnerability.
Potential Impact
Exploitation of this vulnerability allows an attacker to 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 folder, potentially compromising system integrity or confidentiality. The vulnerability does not require user interaction, privileges, or authentication to exploit and has a high severity score (CVSS 7.8).
Mitigation Recommendations
No official fix or patch is currently available for this vulnerability. Users should monitor the Python Software Foundation advisories for updates. Until a fix is released, avoid extracting untrusted tar archives using tarfile.extractall() with the 'data' or 'tar' filter, or implement additional 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
CVE-2026-11940 is a path traversal vulnerability in the tarfile.extractall() function of Python CPython versions before 3.16.0. The vulnerability arises when a malicious tar archive uses a hardlink referencing a symlink located deeper in the archive. The extraction fallback incorrectly validates the symlink at its archived location but recreates it at the hardlink's shallower path, allowing a relative symlink target to escape the intended extraction directory. This flaw can lead to unauthorized file system access outside the destination directory during archive extraction. It represents an incomplete fix of the earlier CVE-2025-4330 vulnerability.
Potential Impact
Exploitation of this vulnerability allows an attacker to 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 folder, potentially compromising system integrity or confidentiality. The vulnerability does not require user interaction, privileges, or authentication to exploit and has a high severity score (CVSS 7.8).
Mitigation Recommendations
No official fix or patch is currently available for this vulnerability. Users should monitor the Python Software Foundation advisories for updates. Until a fix is released, avoid extracting untrusted tar archives using tarfile.extractall() with the 'data' or 'tar' filter, or implement additional 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: 06/23/2026, 17:10:47 UTC
Last updated: 06/24/2026, 02:18:00 UTC
Views: 18
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.