CVE-2026-41140: Poetry: Path traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4
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.
Security readout for executives and security teams
Plain-English summary
Poetry can mishandle archive extraction when processing source distributions on certain Python 3.10 and 3.11 releases. A crafted package archive could write outside the intended extraction location, risking file overwrite and service disruption in developer or CI environments. Poetry fixed this in version 2.3.4.
Executive priority
High priority for organizations that build Python software with Poetry, especially where CI consumes third-party packages. Patch build infrastructure first because compromise could alter files or disrupt builds, affecting software integrity and delivery reliability.
Technical view
CVE-2026-41140 is a CWE-22 path traversal flaw in Poetry before 2.3.4, in src/poetry/utils/helpers.py extractall(). It affects supported Poetry use on Python 3.10.0-3.10.12 and 3.11.0-3.11.4 where tarfile.data_filter is unavailable. CVSS 3.1 is 8.7, with high integrity and availability impact.
Likely exposure
Most likely exposure is CI, build servers, release pipelines, and developer machines running Poetry <2.3.4 on the listed Python versions while extracting sdist tarballs. Environments using newer Poetry, unaffected Python patch levels, or only trusted package inputs have reduced exposure, but should still verify.
Exploitation context
The source bundle does not show CISA KEV listing or confirmed active exploitation. The CVSS vector indicates network attack vector, low complexity, low privileges, and required user interaction. Treat untrusted or third-party source distributions as the primary risk context.
Researcher notes
Evidence is specific to Poetry's tar extraction path and Python versions lacking tarfile.data_filter. The public bundle names a fixed Poetry release but does not provide exploit evidence. Avoid broad claims beyond sdist extraction and the listed Python version constraints.
Mitigation direction
Upgrade Poetry to version 2.3.4 or later.
Prioritize CI, build, and release systems using Poetry.
Verify Python runtime versions against the affected 3.10 and 3.11 ranges.
Restrict or review untrusted sdist sources until patched.
Apply relevant downstream vendor advisories, including Red Hat guidance where applicable.
Validation and detection
Inventory Poetry versions across developer and CI environments.
Identify systems running Python 3.10.0-3.10.12 or 3.11.0-3.11.4.
Check build logs for sdist extraction from external package sources.
Confirm Poetry reports version 2.3.4 or later after remediation.
Review Red Hat status for managed or packaged deployments.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.