CVE-2026-24486·Python vulnerability
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.
- Severity
- high
- Software
- Python
- Fixed in
- 0.0.22
- Published
- 2026-01-27
Affected versions
Until: 0.0.22
Fixed in: 0.0.22
How to fix this CVE
Update the Python-Multipart library to version 0.0.22 or later to patch a path traversal vulnerability that allows attackers to write files to arbitrary filesystem locations when using the UPLOAD_KEEP_FILENAME configuration option. If immediate patching is not possible, disable UPLOAD_KEEP_FILENAME in your application configuration as a temporary mitigation strategy.
sudo dnf update python3-multipartDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST request with multipart/form-data containing filename parameter with path traversal sequences (../ or ..\ patterns) uploaded to an endpoint using python-multipart with UPLOAD_KEEP_FILENAME=True enabledWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block multipart upload requests containing path traversal sequences in filename headers, such as blocking requests with filename values matching regex pattern '(\.\.[\\/]|\.\.%2[fF]|%2e%2e)' before reaching the application.How to check if you are affected
- Check installed Python-Multipart version: pip3 show multipart | grep Version
- Verify if UPLOAD_KEEP_FILENAME is enabled in your application code: grep -r 'UPLOAD_KEEP_FILENAME.*True' /path/to/app/
- Search application logs for suspicious file upload requests with path traversal characters: grep -E '\.\.|\.\.' /var/log/application.log
- Confirm the patch by verifying the installed version matches 0.0.22 or higher: pip3 show multipart | grep Version
Indicators of compromise
- HTTP POST requests with Content-Disposition header containing filename with ../ or ..\
- File creation events in unexpected directories outside configured UPLOAD_DIR during multipart upload processing
- Error logs showing 'permission denied' or 'invalid path' during file write operations in Python-Multipart components
FAQ
What is CVE-2026-24486?
A path traversal vulnerability in Python-Multipart that allows remote attackers to write uploaded files outside the intended directory when UPLOAD_KEEP_FILENAME is enabled, potentially leading to arbitrary code execution or system compromise.
Is CVE-2026-24486 being actively exploited?
While not listed in CISA's actively exploited vulnerabilities catalog, public exploits are available, making this vulnerability a moderate risk in exposed environments.
What versions of Python-Multipart are affected by CVE-2026-24486?
All versions prior to 0.0.22 are affected when using the non-default configuration UPLOAD_KEEP_FILENAME=True with UPLOAD_DIR settings.
How do I check if my server is vulnerable to CVE-2026-24486?
Run 'pip3 show multipart' to check the version, then search your application code for UPLOAD_KEEP_FILENAME=True configuration; if the version is below 0.0.22 and this setting is enabled, you are vulnerable.
Does Defensia detect CVE-2026-24486?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Python-Multipart is installed on a monitored server, CVE-2026-24486 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/Kludex/python-multipart/commit/9433f4bbc9652bdde82bbe380984e32f8cfc89c4
- https://github.com/Kludex/python-multipart/releases/tag/0.0.22
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-wp53-j4wj-2cfg
- https://access.redhat.com/errata/RHSA-2026:10184
- https://access.redhat.com/errata/RHSA-2026:1504
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-24486. Free for 1 server.
Get started free