CVE-2026-7774: CWE-22 in Python Software Foundation CPython
CVE-2026-7774 is a directory traversal vulnerability in the Python CPython tarfile module. Specifically, the tarfile. data_filter function can be bypassed using crafted tar archive entries such as symlinks with empty or directory-like names. This allows malicious tar archives to cause tarfile. extractall() to write files outside the intended extraction directory, potentially overwriting arbitrary files with the permissions of the extracting process. The vulnerability has a CVSS 4. 0 base score of 6. 9, indicating medium severity. No official patch or remediation guidance has been provided yet by the Python Software Foundation. There are no known exploits in the wild at this time.
AI Analysis
Technical Summary
The vulnerability CVE-2026-7774 affects the Python Software Foundation's CPython implementation, specifically the tarfile module's data_filter function. Crafted tar archive entries, including symbolic links with empty or directory-like names, can bypass the data_filter protections. This bypass enables tarfile.extractall() to write files outside the extraction directory, violating intended directory boundaries and potentially allowing unauthorized file writes. The issue is categorized under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). The vulnerability was published on 2026-06-04 with a CVSS 4.0 score of 6.9 (medium severity). No patch or official remediation level has been documented, and no exploits are currently known.
Potential Impact
Successful exploitation allows an attacker to craft a malicious tar archive that, when extracted using tarfile.extractall(), can write files outside the intended extraction directory. This can lead to overwriting or creating files arbitrarily on the filesystem with the permissions of the extracting process, potentially compromising system integrity or security. The impact is limited to the permissions of the user performing the extraction and does not require privileges or user interaction beyond extraction.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should avoid extracting untrusted tar archives using tarfile.extractall() or implement manual checks to validate archive contents before extraction.
CVE-2026-7774: CWE-22 in Python Software Foundation CPython
Description
CVE-2026-7774 is a directory traversal vulnerability in the Python CPython tarfile module. Specifically, the tarfile. data_filter function can be bypassed using crafted tar archive entries such as symlinks with empty or directory-like names. This allows malicious tar archives to cause tarfile. extractall() to write files outside the intended extraction directory, potentially overwriting arbitrary files with the permissions of the extracting process. The vulnerability has a CVSS 4. 0 base score of 6. 9, indicating medium severity. No official patch or remediation guidance has been provided yet by the Python Software Foundation. There are no known exploits in the wild at this time.
CVSS v4.0
Score 6.9medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-7774 affects the Python Software Foundation's CPython implementation, specifically the tarfile module's data_filter function. Crafted tar archive entries, including symbolic links with empty or directory-like names, can bypass the data_filter protections. This bypass enables tarfile.extractall() to write files outside the extraction directory, violating intended directory boundaries and potentially allowing unauthorized file writes. The issue is categorized under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). The vulnerability was published on 2026-06-04 with a CVSS 4.0 score of 6.9 (medium severity). No patch or official remediation level has been documented, and no exploits are currently known.
Potential Impact
Successful exploitation allows an attacker to craft a malicious tar archive that, when extracted using tarfile.extractall(), can write files outside the intended extraction directory. This can lead to overwriting or creating files arbitrarily on the filesystem with the permissions of the extracting process, potentially compromising system integrity or security. The impact is limited to the permissions of the user performing the extraction and does not require privileges or user interaction beyond extraction.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should avoid extracting untrusted tar archives using tarfile.extractall() or implement manual checks to validate archive contents before extraction.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-05-04T14:47:51.154Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a219e6ee29bf47b50b44825
Added to database: 6/4/2026, 3:49:02 PM
Last enriched: 6/4/2026, 4:03:33 PM
Last updated: 6/4/2026, 5:04:23 PM
Views: 5
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.