Loading advisory.
Loading advisory.
Python-Multipart has Arbitrary File Write via Non-Default Configuration
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.
Published 2026-01-26 23:28 UTC · Modified 2026-09-16 12:04 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| python-multipart | PyPI | < 0.0.22 versions 0.0.1, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19, 0.0.2, 0.0.20, 0.0.21, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8 and 1 more | 0.0.22 | pip install --upgrade 'python-multipart>=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.
When UPLOAD_DIR is set and UPLOAD_KEEP_FILENAME is True, the library constructs the file path using os.path.join(file_dir, fname). Due to the behavior of os.path.join(), if the filename begins with a /, all preceding path components are discarded:
os.path.join("/upload/dir", "/etc/malicious") == "/etc/malicious"This allows an attacker to bypass the intended upload directory and write files to arbitrary paths.
Projects are only affected if all of the following are true:
UPLOAD_DIR is set
UPLOAD_KEEP_FILENAME is set to True
The uploaded file exceeds MAX_MEMORY_FILE_SIZE (triggering a flush to disk)
The default configuration is not vulnerable.
Arbitrary file write to attacker-controlled paths on the filesystem.
Upgrade to version 0.0.22, or avoid using UPLOAD_KEEP_FILENAME=True in project configurations.
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.022 on 2026-11-24 to 0.022 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.022 | first score | v2026.06.15 |
| 2026-11-26 | 0.022 | 0.022 | v2026.06.15 |