Improper Validation of Specified Quantity in Input Affecting python-multipart package, versions [,0.0.31)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYTHONMULTIPART-17345735
  • published16 Jun 2026
  • disclosed15 Jun 2026
  • creditGanni Galea Curmi, Seokhee Chang

Introduced: 15 Jun 2026

CVE-2026-53540  (opens in a new tab)
CWE-1284  (opens in a new tab)

How to fix?

Upgrade python-multipart to version 0.0.31 or higher.

Overview

python-multipart is an A streaming multipart parser for Python

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input in the parse_form function when processing a negative Content-Length header. An attacker can cause excessive memory usage by sending a crafted request with a negative Content-Length, resulting in the entire request body being buffered in memory at once.

Note:

This is only exploitable if the application directly calls parse_form with a Content-Length header taken from attacker-controlled input and does not normalize negative values first.

CVSS Base Scores

version 4.0
version 3.1