CVE-2026-41140: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in python-poetry poetry
Poetry is a dependency manager for Python. Prior to 2.3.4, the extractall() function in src/poetry/utils/helpers.py:410-426 extracts sdist tarballs without path traversal protection on Python versions where tarfile.data_filter is unavailable. Considering only Python versions which are still supported by Poetry, these are 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4. This vulnerability is fixed in 2.3.4.
AI Analysis
Technical Summary
Poetry, a Python dependency manager, had a path traversal vulnerability (CWE-22) in its extractall() function located in src/poetry/utils/helpers.py lines 410-426. This vulnerability affects versions prior to 2.3.4 when running on supported Python versions 3.10.0 through 3.10.12 and 3.11.0 through 3.11.4, due to lack of path traversal protection when tarfile.data_filter is unavailable. The flaw allows extraction of tarballs without restricting pathnames to a safe directory, potentially enabling files to be written outside intended locations. The issue is resolved in poetry version 2.3.4. Red Hat advisories acknowledge this vulnerability and provide updates for affected products.
Potential Impact
The vulnerability allows an attacker to perform path traversal during extraction of sdist tarballs, potentially leading to files being written outside the intended directory. The CVSS 4.0 base score is 0.6 (low severity), indicating limited impact. There is no indication of known exploits in the wild. The impact is limited to affected poetry versions running on specific Python versions lacking tarfile.data_filter support.
Mitigation Recommendations
A fix is available in poetry version 2.3.4. Users should upgrade to version 2.3.4 or later to remediate this vulnerability. Red Hat provides advisories and updates addressing this issue for their affected products. Patch status is confirmed by vendor advisories. No additional mitigation steps are specified or required beyond applying the official fix.
CVE-2026-41140: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in python-poetry poetry
Description
Poetry is a dependency manager for Python. Prior to 2.3.4, the extractall() function in src/poetry/utils/helpers.py:410-426 extracts sdist tarballs without path traversal protection on Python versions where tarfile.data_filter is unavailable. Considering only Python versions which are still supported by Poetry, these are 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4. This vulnerability is fixed in 2.3.4.
CVSS v4.0
Score 0.6low
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
Poetry, a Python dependency manager, had a path traversal vulnerability (CWE-22) in its extractall() function located in src/poetry/utils/helpers.py lines 410-426. This vulnerability affects versions prior to 2.3.4 when running on supported Python versions 3.10.0 through 3.10.12 and 3.11.0 through 3.11.4, due to lack of path traversal protection when tarfile.data_filter is unavailable. The flaw allows extraction of tarballs without restricting pathnames to a safe directory, potentially enabling files to be written outside intended locations. The issue is resolved in poetry version 2.3.4. Red Hat advisories acknowledge this vulnerability and provide updates for affected products.
Potential Impact
The vulnerability allows an attacker to perform path traversal during extraction of sdist tarballs, potentially leading to files being written outside the intended directory. The CVSS 4.0 base score is 0.6 (low severity), indicating limited impact. There is no indication of known exploits in the wild. The impact is limited to affected poetry versions running on specific Python versions lacking tarfile.data_filter support.
Mitigation Recommendations
A fix is available in poetry version 2.3.4. Users should upgrade to version 2.3.4 or later to remediate this vulnerability. Red Hat provides advisories and updates addressing this issue for their affected products. Patch status is confirmed by vendor advisories. No additional mitigation steps are specified or required beyond applying the official fix.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-17T12:59:15.738Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-41140","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:24866","vendor":"Red Hat"}]
Threat ID: 69ebaa0487115cfb685ef421
Added to database: 04/24/2026, 17:36:04 UTC
Last enriched: 07/15/2026, 09:14:01 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 111
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.