# CVE-2026-34591: python-poetry Poetry path traversal in wheel installer

Source: https://junglewise.ai/threats/cve-2026-34591-python-poetry-poetry-path-traversal-in-wheel-installer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-02. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-34591 · Severity: medium · CVSS 6.5 · Published 2026-04-02

Poetry, a popular dependency manager for Python, is vulnerable to a security flaw that allows a malicious package to write files to unauthorized locations on a user's computer. If a developer or automated system installs a specially crafted 'wheel' package, the software can bypass security checks and overwrite sensitive system or configuration files. This could lead to system instability or provide a foothold for further attacks on development environments and CI/CD pipelines.

Technologies: [poetry (PyPI)](https://junglewise.ai/threats/technologies/poetry). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-34591 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-34591 being exploited in the wild.

**How severe is CVE-2026-34591?** Medium severity, with a CVSS score of 6.5, published 2 April 2026.

**Which products and versions are affected?** poetry (PyPI) >= 1.4.0, <= 2.3.2, ECOSYSTEM:introduced=1.4.0,fixed=2.3.3.

**Is there a fix for CVE-2026-34591?** Yes. poetry (PyPI): upgrade to 2.3.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-34591 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-34591?** Check whether you run poetry (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- poetry (PyPI): upgrade to 2.3.3 or later

  ```sh
  pip install "poetry>=2.3.3"
  ```


## Technical details

A path traversal vulnerability (CWE-22) exists in Poetry's wheel installer component. The `write_to_fs` function in `src/poetry/installation/wheel_installer.py` failed to perform containment checks on file paths within a wheel archive. By including `../` sequences in a crafted wheel, an attacker can cause Poetry to write files to arbitrary locations on the filesystem with the permissions of the Poetry process. While installation alone typically does not execute code, the ability to overwrite configuration files or binaries can lead to remote code execution. The issue is patched in version 2.3.3 by resolving and validating target paths to ensure they remain within the intended installation scheme directory.

## Affected products

- python-poetry Poetry >= 1.4.0, < 2.3.3

## Identifiers

- CVE-2026-34591
- GHSA-2599-h6xx-hpxp
- PYSEC-2026-2260

## Timeline

- 2026-03-29: patched: Fix merged in pull request #10792 and released in version 2.3.3
- 2026-03-31: advisory: GitHub Security Advisory GHSA-2599-h6xx-hpxp published
- 2026-04-02: disclosed: CVE-2026-34591 published to NVD

## References

- [http://github.com/python-poetry/poetry/commit/ed59537ac3709cfbdbf95d957de801c13872991a](http://github.com/python-poetry/poetry/commit/ed59537ac3709cfbdbf95d957de801c13872991a)
- [https://github.com/python-poetry/poetry/pull/10792](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/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)

## Related threats

- [Poetry path traversal in sdist extraction](https://junglewise.ai/threats/cve-2026-41140-poetry-path-traversal-in-sdist-extraction)
- [Poetry vulnerable to Untrusted Search Path leading to Local Code Execution on Windows](https://junglewise.ai/threats/cve-2022-36070-poetry-vulnerable-to-untrusted-search-path-leading-to-local-code)
- [Poetry Argument Injection can lead to Local Code Execution](https://junglewise.ai/threats/cve-2022-36069-poetry-argument-injection-can-lead-to-local-code-execution)
- [Poetry before v1.1.9 contains Untrusted Search Path](https://junglewise.ai/threats/cve-2022-26184-poetry-before-v1-1-9-contains-untrusted-search-path)
