Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-11940: CWE-22 in Python Software Foundation CPython

0
High
VulnerabilityCVE-2026-11940cvecve-2026-11940cwe-22cwe-59
Published: 06/23/2026 (06/23/2026, 16:04:17 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
High
Subsq. Integrity
High
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N

Affected software

GitHub Actionsmore threats →cve
CPython
pkg:github/CPython
Affected versions
<3.16.0

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

AILast updated: 06/23/2026, 17:10:47 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses