CVE-2026-34591·Python vulnerability
Poetry is a dependency manager for Python. From version 1.4.0 to before version 2.3.3, a crafted wheel can contain ../ paths that Poetry writes to disk without containment checks, allowing arbitrary file write with the privileges of the Poetry process. It is reachable from untrusted package artifacts during normal install flows. (Normally, installing a malicious wheel is not sufficient for execution of malicious code. Malicious code will only be executed after installation if the malicious package is imported or invoked by the user.). This issue has been patched in version 2.3.3.
- Severity
- medium
- Software
- Python
- Fixed in
- 2.3.3
- Published
- 2026-04-02
Affected versions
From: 1.4.0
Until: 2.3.3
Fixed in: 2.3.3
How to fix this CVE
Update Poetry to version 2.3.3 or later to prevent arbitrary file writes during wheel extraction. If you are using Poetry as your Python dependency manager, prioritize this update immediately as malicious wheels can exploit path traversal to write files outside the intended installation directory. Verify the update by running `poetry --version` and confirm it shows 2.3.3 or newer.
sudo dnf update python3-poetryDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check Poetry version by running `poetry --version` and confirm it is below 2.3.3
- Step 2: List all installed wheels in your Poetry cache directory with `ls ~/.cache/pypoetry/` to identify potentially malicious artifacts
- Step 3: Search system logs for Poetry installation errors or file write failures using `grep -r 'poetry' /var/log/ | grep -i error`
- Step 4: Verify the fix by upgrading Poetry and re-running `poetry --version` to confirm version 2.3.3 or later is installed
FAQ
What is CVE-2026-34591?
CVE-2026-34591 is a path traversal vulnerability in Poetry (Python's dependency manager) versions 1.4.0 through 2.3.2 that allows malicious wheel files to write arbitrary files to the filesystem using ../ directory traversal sequences, bypassing containment checks during package installation.
Is CVE-2026-34591 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, though the risk remains significant for users of affected Poetry versions.
What versions of Poetry are affected by CVE-2026-34591?
Poetry versions 1.4.0 through 2.3.2 are vulnerable; version 2.3.3 and later include the security patch.
How do I check if my server is vulnerable to CVE-2026-34591?
Run `poetry --version` on systems where Poetry is installed; if the output shows a version between 1.4.0 and 2.3.2 (inclusive), your system is vulnerable and requires immediate upgrade.
Does Defensia detect CVE-2026-34591?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Poetry is installed on a monitored server, CVE-2026-34591 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- http://github.com/python-poetry/poetry/commit/ed59537ac3709cfbdbf95d957de801c13872991a
- https://github.com/python-poetry/poetry/pull/10792
- https://github.com/python-poetry/poetry/releases/tag/2.3.3
- https://github.com/python-poetry/poetry/security/advisories/GHSA-2599-h6xx-hpxp
- https://github.com/python-poetry/poetry/security/advisories/GHSA-2599-h6xx-hpxp
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-34591. Free for 1 server.
Get started free