CVE-2026-41140 Poetry: Path traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4

Low 0.6 Published Updated

Attackers can exploit path traversal in Poetry's tar extraction to write files outside the intended directory, potentially leading to code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-41140?

CVE-2026-41140 is a low-severity path traversal vulnerability in python-poetry poetry, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2026-41140?

3 open source packages ship an affected version, including poetry.

PackageAffectedFixed in
poetry PyPIAll versions2.3.4
poetry PyPIAll versions2.3.4
poetry PyPIAll versions2.3.4

How do I fix CVE-2026-41140?

Upgrade poetry to 2.3.4 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-41140 being exploited?

There is no known exploitation of CVE-2026-41140 in the wild and no public exploit code.

Sources

Also known as AZL-84035, DEBIAN-CVE-2026-41140, GHSA-73h3-mf4w-8647, MINI-fg5x-hfh7-2v7w, PYSEC-2026-2890, ROOT-APP-PYPI-CVE-2026-41140 and 1 more.

Is CVE-2026-41140 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free