Junglewise Threat Intelligence

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

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

Vendors: PyPI.

Executive brief

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.

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

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

Related threats