Skip to main content
VulnerabilityPublished Updated

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

Affects gptmeSource GCVE Database

0
Compare
Authoritative record:CVE-2026-53540· Low 3.7

Not known to be exploited · CVSS 3.7 Low : upgrade to 0.31.0_12 when convenient.

Data as of 4 Nov 2026, 21:27 UTC

CVSS 3.1 base score
3.7Low
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 27% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.31.0_12
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 22 Jun 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Nov 2026.

What to do

Upgrade gptme to 0.31.0_12.

Affected software

ProductAffectedFixed in
Homebrewgptmepkg:brew/gptmeOther threatsAffected
  • >=0.28.0 <0.31.0_12
Fixed in
  • 0.31.0_12

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade python-multipart to version 0.31.0_12 or later, which rejects negative Content-Length headers with a ValueError before reading the request body. If using bespoke WSGI or http.server handlers that call parse_form() directly, ensure they normalize or validate Content-Length headers to prevent negative values.

Description

The python-multipart library's parse_form() function did not validate the Content-Length header for negative values, causing a negative Content-Length to trigger reading the entire request body into memory at once instead of in chunks. This affects only code that calls parse_form() directly with attacker-controlled negative Content-Length headers without normalization. Common frameworks like Starlette, FastAPI, and Werkzeug are not affected. The issue can degrade availability under concurrent requests but does not cause complete denial of service. Version 0.31.0_12 and later reject negative Content-Length values to prevent this behavior.

References

Community reviews

Loading reviews…