CVE-2026-53540: python-multipart · Negative Content-Length in parse_form buffers the entire body in memory
Affects fastapiSource GCVE Database
Not known to be exploited · CVSS 3.7 Low : upgrade to 0.137.0 when convenient.
Data as of 9 Nov 2026, 20:02 UTC
- Patch
- Available – fixed in 0.137.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 22 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 9 Nov 2026.
What to do
Upgrade fastapi to 0.137.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewfastapipkg:brew/fastapiOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade python-multipart to version 0.137.0 or later, which rejects negative Content-Length headers with a ValueError before reading the stream. If upgrading is not immediately possible, ensure that any code calling parse_form() normalizes or validates the Content-Length header to prevent negative values from being passed.
Description
The python-multipart library's parse_form() function did not validate the Content-Length header for negative values, causing it to read the entire request body into memory at once instead of in chunks. This issue affects code that calls parse_form() directly with attacker-controlled negative Content-Length headers without normalization. Common frameworks like Starlette, FastAPI, and Werkzeug are not affected. The vulnerability can lead to increased memory usage and degraded availability under concurrent requests but does not cause complete denial of service. Version 0.137.0 and later reject negative Content-Length values to prevent this behavior.