{"id":"CVE-2026-53540","published":"2026-06-22T16:58:54Z","modified":"2026-06-22T17:21:55Z","title":"Python-Multipart: Negative Content-Length in parse_form buffers the entire body in memory","vendor":"Kludex","product":"python-multipart","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00342,"percentile":0.28456,"provenance":"source"},"cwes":[{"id":"CWE-1284","name":"Improper Validation of Specified Quantity in Input"}],"references":[{"url":"https://github.com/Kludex/python-multipart/security/advisories/GHSA-v9pg-7xvm-68hf","tags":["x_refsource_CONFIRM"]}],"priority":{"score":8.3,"factors":[{"name":"EPSS percentile","points":5.69},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"kludex","affectedVersions":[{"vendor":"Kludex","product":"python-multipart","versions":["< 0.0.31"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-22T17:21:49.069742Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"python-multipart","vulnerableRanges":["<0.0.31"],"patched":["0.0.31"],"from":["GHSA-v9pg-7xvm-68hf","PYSEC-2026-3040"],"provenance":"source"}],"summary":{"text":"Python-Multipart, a streaming multipart parser for Python, has a flaw in its parse_form() function, which did not validate the Content-Length header before using it to bound reads of the request body. An attacker sending a request with a negative Content-Length can cause the entire body to be loaded into memory in one read rather than in fixed-size chunks, which requires only network access to a service that uses the library and no authentication or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:11Z"},"euvd":{"id":"EUVD-2026-38325","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-53537","published":"2026-06-22","fixed":"0.0.30","kev":false,"link":{"from":"CVE-2026-53537","to":"CVE-2026-53540","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:python-multipart","fromFixed":"0.0.30","toFixed":"0.0.31","daysApart":0}]}},{"cve":"CVE-2026-53538","published":"2026-06-22","fixed":"0.0.30","kev":false},{"cve":"CVE-2026-53539","published":"2026-06-22","fixed":"0.0.30","kev":false},{"cve":"CVE-2026-53540","published":"2026-06-22","fixed":"0.0.31","kev":false}],"package":"PyPI:python-multipart"}}