Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-24486

Python-Multipart has Arbitrary File Write via Non-Default Configuration
Back to all
CVE

CVE-2026-24486

Python-Multipart has Arbitrary File Write via Non-Default Configuration

Summary

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

Details

When UPLOAD_DIR is set and UPLOADKEEPFILENAME 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.                                         

                                                                                                                                              

Affected Configuration                                                                                                                      

                                                                                                                                              

Projects are only affected if all of the following are true:                                                                                     

  • UPLOAD_DIR is set
  • UPLOADKEEPFILENAME is set to True
  • The uploaded file exceeds MAXMEMORYFILE_SIZE (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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

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

Related Resources

No items found.

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

Severity

8.6

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
8.6
EPSS Probability
0.00027%
EPSS Percentile
0.07219%
Introduced Version
0,0.0.13,0.0.10,0.0.9
Fix Available
0.0.22

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading