CVE-2026-24486: Python-Multipart has Arbitrary File Write via Non-Default Configuration

Published Jan 26, 2026
·
Updated

Summary

A Path Traversal vulnerability exists when using non-default configuration options UPLOADDIR and UPLOADKEEPFILENAME=True. An attacker can write uploaded files to arbitrary locations on the filesystem by crafting a malicious filename.

Details

When UPLOADDIR is set and UPLOADKEEPFILENAME is True, the library constructs the file path using os.path.join(filedir, fname). Due to the behavior of os.path.join(), if the filename begins with a /, all preceding path components are discarded:

py 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. Affected Configuration Projects are only affected if all of the following are true: - UPLOADDIR is set - UPLOADKEEPFILENAME is set to True - The uploaded file exceeds MAXMEMORYFILESIZE (triggering a flush to disk)

The default configuration is not vulnerable. Impact Arbitrary file write to attacker-controlled paths on the filesystem. Mitigation Upgrade to version 0.0.22, or avoid using UPLOADKEEPFILENAME=True in project configurations.

Other sources

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 UPLOADDIR and UPLOADKEEPFILENAME=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 UPLOADKEEPFILENAME=True in project configurations.

MITRE

Affected Software

3 affected componentsFixes available
pip/python-multipart<0.0.22
0.0.22
Fastapiexpert Python-multipart Python<0.0.22
IBM watsonx.data intelligence<=5.2.0, 5.2.1, 5.3.0, 5.3.1

Event History

Jan 26, 2026
Advisory Published
via GitHub·11:28 PM
Data Sourced
via GitHub·11:28 PM
DescriptionSeverityWeaknessAffected Software
Jan 27, 2026
CVE Published
via MITRE·12:34 AM
Data Sourced
via MITRE·12:34 AM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·01:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·01:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:16 AM
RemedyAffected Software
Apr 27, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Apr 30, 2026
Exploit Published
via ExploitDB·12:00 AM
Known Exploited
12:42 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-24486?

CVE-2026-24486 is considered a high severity vulnerability due to its potential for arbitrary file write capabilities.

2

How do I fix CVE-2026-24486?

To fix CVE-2026-24486, ensure that you are using the default configuration for the `UPLOAD_DIR` and set `UPLOAD_KEEP_FILENAME=False`.

3

Which versions of python-multipart are affected by CVE-2026-24486?

Versions of python-multipart prior to 0.0.22 are affected by CVE-2026-24486.

4

What types of attacks can exploit CVE-2026-24486?

CVE-2026-24486 can be exploited by attackers to write malicious files to arbitrary locations on the filesystem.

5

Is there a workaround for CVE-2026-24486 if I cannot upgrade?

If upgrading is not possible, a temporary workaround is to disable non-default configuration options related to file uploads.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203