CVE-2026-53540

Python-Multipart: Negative Content-Length in parse_form buffers the entire body in memory

State
Published
Severity
3.7 Low
Published
Jun 22, 2026
Updated
Jun 22, 2026
Reserved
Jun 9, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.13.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LGitHub_M

Weaknesses

  • CWE-1284 Improper Validation of Specified Quantity in Input

Affected Products

ProductVersions
python-multipartKludex
  • < 0.0.31Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.