CVE-2026-7774: CWE-22 in Python Software Foundation CPython
tarfile.data_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() to write files outside the destination directory, subject to the permissions of the extracting process.
AI Analysis
Technical Summary
The vulnerability in Python's CPython tarfile module (CVE-2026-7774) involves a bypass of the data_filter function through specially crafted link entries, including symbolic links with empty or directory-like names. This bypass enables an attacker to redirect extraction of archive members outside the target directory when using tarfile.extractall(). The flaw is a directory traversal issue categorized under CWE-22. It affects multiple CPython versions including 3.11.0, 3.12.0, 3.13.0, 3.14.0, and 3.15.0a1. The CVSS 4.0 base score is 6.9 (medium severity), indicating a network attack vector with low complexity and no privileges required, but requiring user interaction and resulting in high impact on integrity.
Potential Impact
Successful exploitation allows an attacker to write files outside the intended extraction directory, potentially overwriting or creating arbitrary files on the target system with the permissions of the user running the extraction. This can lead to unauthorized file modification or code execution depending on the context and permissions. There are no known exploits in the wild at this time.
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 with tarfile.extractall() or use safer extraction methods that validate paths. Monitor official Python channels for updates and patches.
CVE-2026-7774: CWE-22 in Python Software Foundation CPython
Description
tarfile.data_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() to write files outside the destination directory, subject to the permissions of the extracting process.
CVSS v4.0
Score 6.9medium
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.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Python's CPython tarfile module (CVE-2026-7774) involves a bypass of the data_filter function through specially crafted link entries, including symbolic links with empty or directory-like names. This bypass enables an attacker to redirect extraction of archive members outside the target directory when using tarfile.extractall(). The flaw is a directory traversal issue categorized under CWE-22. It affects multiple CPython versions including 3.11.0, 3.12.0, 3.13.0, 3.14.0, and 3.15.0a1. The CVSS 4.0 base score is 6.9 (medium severity), indicating a network attack vector with low complexity and no privileges required, but requiring user interaction and resulting in high impact on integrity.
Potential Impact
Successful exploitation allows an attacker to write files outside the intended extraction directory, potentially overwriting or creating arbitrary files on the target system with the permissions of the user running the extraction. This can lead to unauthorized file modification or code execution depending on the context and permissions. There are no known exploits in the wild at this time.
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 with tarfile.extractall() or use safer extraction methods that validate paths. Monitor official Python channels for updates and patches.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-05-04T14:47:51.154Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a219e6ee29bf47b50b44825
Added to database: 06/04/2026, 15:49:02 UTC
Last enriched: 08/13/2026, 13:10:55 UTC
Last updated: 09/14/2026, 22:01:37 UTC
Views: 107
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.