| Name | CVE-2026-53540 |
| Description | Python-Multipart is a streaming multipart parser for Python. Prior to 0.0.31, parse_form() did not validate the Content-Length header before using it to bound its chunked read of the request body. A negative Content-Length turned the bounded read into a read-until-EOF, so the entire body was loaded into memory in a single read instead of in fixed-size chunks. This vulnerability is fixed in 0.0.31. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
| Debian Bugs | 1140628 |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|
| python-multipart (PTS) | bullseye | 0.0.5-2 | vulnerable |
| bookworm | 0.0.5-3 | vulnerable |
| trixie | 0.0.20-1.1~deb13u1 | vulnerable |
| forky, sid | 0.0.26-1 | vulnerable |
The information below is based on the following data on fixed versions.
Notes
[trixie] - python-multipart <no-dsa> (Minor issue)
[bookworm] - python-multipart <postponed> (Minor issue; negative Content-Length unvalidated in parse_form(), which starlette/fastapi do not use)
[bullseye] - python-multipart <postponed> (Minor issue; negative Content-Length unvalidated in parse_form(), which starlette/fastapi do not use)
https://github.com/Kludex/python-multipart/security/advisories/GHSA-v9pg-7xvm-68hf
https://github.com/Kludex/python-multipart/pull/297
Fixed by: https://github.com/Kludex/python-multipart/commit/c814948acf509cef7881fa75c969969b19239bbf (0.0.31)