Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. python-multipart
  4. ›
  5. CVE-2026-53540

CVE-2026-53540: python-multipart: Negative Content-Length in parse_form buffers the entire body in memory

June 15, 2026

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.

References

  • github.com/Kludex/python-multipart/security/advisories/GHSA-v9pg-7xvm-68hf
  • github.com/advisories/GHSA-v9pg-7xvm-68hf
  • nvd.nist.gov/vuln/detail/CVE-2026-53540

Code Behaviors & Features

Detect and mitigate CVE-2026-53540 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.31

Fixed versions

  • 0.0.31

Solution

Upgrade to version 0.0.31 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-1284: Improper Validation of Specified Quantity in Input

Source file

pypi/python-multipart/CVE-2026-53540.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 16 Jun 2026 00:17:38 +0000.