CVE-2026-53540: CWE-1284: Improper Validation of Specified Quantity in Input in Kludex python-multipart
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.
AI Analysis
Technical Summary
Python-Multipart is a streaming multipart parser for Python. Versions before 0.0.31 do not validate the Content-Length header before using it to limit chunked reads of the request body. If the Content-Length header is negative, the bounded read logic fails, resulting in reading until EOF and loading the entire body into memory in a single operation. This can lead to increased memory usage. The vulnerability is addressed in version 0.0.31.
Potential Impact
The vulnerability causes the parser to load the entire request body into memory when a negative Content-Length header is provided, potentially leading to increased memory consumption and degraded performance. There is no impact on confidentiality or integrity. The CVSS score is 3.7 (low), reflecting limited impact and the requirement for network access with high attack complexity.
Mitigation Recommendations
Upgrade python-multipart to version 0.0.31 or later, where the Content-Length header is properly validated to prevent this issue. No other mitigations are indicated or necessary.
CVE-2026-53540: CWE-1284: Improper Validation of Specified Quantity in Input in Kludex python-multipart
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.
CVSS v3.1
Score 3.7low
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Python-Multipart is a streaming multipart parser for Python. Versions before 0.0.31 do not validate the Content-Length header before using it to limit chunked reads of the request body. If the Content-Length header is negative, the bounded read logic fails, resulting in reading until EOF and loading the entire body into memory in a single operation. This can lead to increased memory usage. The vulnerability is addressed in version 0.0.31.
Potential Impact
The vulnerability causes the parser to load the entire request body into memory when a negative Content-Length header is provided, potentially leading to increased memory consumption and degraded performance. There is no impact on confidentiality or integrity. The CVSS score is 3.7 (low), reflecting limited impact and the requirement for network access with high attack complexity.
Mitigation Recommendations
Upgrade python-multipart to version 0.0.31 or later, where the Content-Length header is properly validated to prevent this issue. No other mitigations are indicated or necessary.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-09T18:13:07.263Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a39735aeed863c81e396236
Added to database: 06/22/2026, 17:39:38 UTC
Last enriched: 06/22/2026, 18:09:21 UTC
Last updated: 06/22/2026, 20:56:04 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.