CVE-2026-4360: CWE-281 in Python Software Foundation CPython
In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.
AI Analysis
Technical Summary
The vulnerability in CPython's Tarfile.extract() function involves improper handling of the filter parameter during extraction of hardlinks. When extracting content from untrusted tar files, the filter='data' parameter intended to restrict extraction is not enforced correctly for hardlinks, potentially allowing files to be written with unexpected uid/gid values. This could lead to unintended file ownership changes on the affected system. The issue is tracked as CWE-281 (Improper Restriction of Operations within the Bounds of a Memory Buffer).
Potential Impact
An attacker who can supply a crafted tar archive to a system running a vulnerable CPython version and invoking Tarfile.extract() with a filter may cause files to be created with unexpected user and group IDs. This could potentially lead to minor privilege or access control issues. The CVSS score is low (2.0), indicating limited impact and requiring privileges and user interaction for exploitation.
Mitigation Recommendations
No official fix or patch is currently confirmed for this vulnerability. Users should monitor the Python Software Foundation advisories for updates. Until a patch is available, avoid extracting untrusted tar files using Tarfile.extract() with the filter parameter or apply additional manual validation of extracted file ownership. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
CVE-2026-4360: CWE-281 in Python Software Foundation CPython
Description
In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.
CVSS v4.0
Score 2.0low
Affected software
Run 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 CPython's Tarfile.extract() function involves improper handling of the filter parameter during extraction of hardlinks. When extracting content from untrusted tar files, the filter='data' parameter intended to restrict extraction is not enforced correctly for hardlinks, potentially allowing files to be written with unexpected uid/gid values. This could lead to unintended file ownership changes on the affected system. The issue is tracked as CWE-281 (Improper Restriction of Operations within the Bounds of a Memory Buffer).
Potential Impact
An attacker who can supply a crafted tar archive to a system running a vulnerable CPython version and invoking Tarfile.extract() with a filter may cause files to be created with unexpected user and group IDs. This could potentially lead to minor privilege or access control issues. The CVSS score is low (2.0), indicating limited impact and requiring privileges and user interaction for exploitation.
Mitigation Recommendations
No official fix or patch is currently confirmed for this vulnerability. Users should monitor the Python Software Foundation advisories for updates. Until a patch is available, avoid extracting untrusted tar files using Tarfile.extract() with the filter parameter or apply additional manual validation of extracted file ownership. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-03-17T19:25:46.527Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a43db7c27e9c79719f8cbd4
Added to database: 06/30/2026, 15:06:36 UTC
Last enriched: 06/30/2026, 15:21:51 UTC
Last updated: 06/30/2026, 15:51:47 UTC
Views: 10
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.