# CVE-2026-53540: Python-Multipart: Negative Content-Length in parse_form buffers the entire body in memory

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2026-06-15T20:23:45.000Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-v9pg-7xvm-68hf, PYSEC-2026-3040
- Weaknesses: CWE-1284
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Kludex python-multipart: < 0.0.31
- python-multipart (PyPI): before 0.0.31
- fastapiexpert python-multipart: before 0.0.31

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- PyPA Advisory Database: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/Kludex/python-multipart/security/advisories/GHSA-v9pg-7xvm-68hf> (vendor-advisory, web)
- <https://github.com/Kludex/python-multipart> (package)
- <https://pypi.org/project/python-multipart> (package)
- <https://github.com/advisories/GHSA-v9pg-7xvm-68hf> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-53540> (advisory)

## Sources

- CVE List: [CVE-2026-53540](https://www.cve.org/CVERecord?id=CVE-2026-53540), CVE Terms of Use, modified 2026-06-22
- GitHub Advisory Database: [GHSA-v9pg-7xvm-68hf](https://github.com/advisories/GHSA-v9pg-7xvm-68hf), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-53540](https://nvd.nist.gov/vuln/detail/CVE-2026-53540), Public domain, modified 2026-10-25
- PyPA Advisory Database: [PYSEC-2026-3040](https://osv.dev/vulnerability/PYSEC-2026-3040), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-53540 · Whole record: https://cve.day/CVE-2026-53540.json · Rebuilt by cve.day 2026-11-25T22:59:25.390Z
