# python-multipart: Negative Content-Length in parse_form buffers the entire body in memory

Advisory record · `GHSA-v9pg-7xvm-68hf`

- **Identifiers:** `GHSA-v9pg-7xvm-68hf` · `CVE-2026-53540` · `PYSEC-2026-3040`
- **State:** Confirmed
- **Severity:** CVSS 3.7 Low
- **Critical:** No
- **Weakness (CWE):** [CWE-1284](https://cwe.mitre.org/data/definitions/1284.html)
- **Tags:** [CWE-1284](https://agentprime.io/advisories/tag/cwe-1284.md)
- **Published:** 15 Jun 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 15 Jun 2026, 20:23 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `python-multipart` (PyPI): affected `<0.0.31`; fixed in `0.0.31`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Affected: python-multipart versions before 0.0.31. A negative Content-Length value passed to parse_form() causes the whole request body to be read into memory at once instead of in chunks. The attack needs only to send a crafted request, and the impact is limited to applications that call parse_form() directly with raw client headers, where it can degrade availability under concurrent requests. Upgrade to python-multipart 0.0.31 or later, which rejects negative Content-Length values.

Written 4 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 3.7 Low, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0034, the 27th percentile, on 8 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:29 UTC: First seen by agentprime
- 31 Oct 2026, 14:29 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-v9pg-7xvm-68hf)

## Sources

- [GitHub Advisory Database: GHSA-v9pg-7xvm-68hf](https://github.com/advisories/GHSA-v9pg-7xvm-68hf)
- [OSV: GHSA-v9pg-7xvm-68hf](https://osv.dev/vulnerability/GHSA-v9pg-7xvm-68hf)
- <https://github.com/Kludex/python-multipart/security/advisories/GHSA-v9pg-7xvm-68hf>
- <https://github.com/Kludex/python-multipart>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-v9pg-7xvm-68hf>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-v9pg-7xvm-68hf/>. Everything for agents: <https://agentprime.io/llms.txt>.
