python-multipart is a streaming multipart parser for Python.
CVE-2024-24762
Summary When using form data, python-multipart uses a Regular Expression to parse the HTTP Content-Type header, including options. An attacker could send a custom-made Content-Type option that is very difficult for the RegEx to process, consuming CPU resources and stalling indefinitely (minutes or more) while holding the main event loop. This means that process can't handle any more requests. This can create a ReDoS (Regular expression Denial of Service): https://owasp.org/www-community/attacks/RegularexpressionDenialofService-ReDoS This only applies when the app uses form data, parsed with python-multipart. Details A regular HTTP Content-Type header could look like: Content-Type: text/html; charset=utf-8 python-multipart parses the option with this RegEx: https://github.com/andrew-d/python-multipart/blob/d3d16dae4b061c34fe9d3c9081d9800c49fc1f7a/multipart/multipart.py#L72-L74 A custom option could be made and sent to the server to break it with: Content-Type: application/x-www-form-urlencoded;…
Assessment
- CVSS
- 7.5 (v3.1)
- Severity
- High
- EPSS
- 1.52% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 5 February 2024
- Last updated
- 17 June 2026
- Affected
- Kludex · encode · tiangolo · fastapi · python-multipart · starlette · python-multipart
- Weakness
- CWE-1333, CWE-400
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
At the source
References
- https://github.com/Kludex/python-multipart/commit/20f0ef6b4e4caf7d69a667c54dff57fe467109a4
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-2jv5-9r88-3w3p
- https://github.com/andrew-d/python-multipart/blob/d3d16dae4b061c34fe9d3c9081d9800c49fc1f7a/multipart/multipart.py#L72-L74
- https://github.com/encode/starlette/commit/13e5c26a27f4903924624736abd6131b2da80cc5
- https://github.com/encode/starlette/security/advisories/GHSA-93gm-qmq6-w238
- https://github.com/tiangolo/fastapi/commit/9d34ad0ee8a0dfbbcce06f76c2d5d851085024fc
- https://github.com/tiangolo/fastapi/releases/tag/0.109.1
- https://github.com/tiangolo/fastapi/security/advisories/GHSA-qf9m-vfgh-m389
- https://nvd.nist.gov/vuln/detail/CVE-2024-24762
- https://github.com/pypa/advisory-database/tree/main/vulns/fastapi/PYSEC-2024-38.yaml
- https://github.com/github/advisory-database/pull/4829
- https://github.com/advisories/GHSA-2jv5-9r88-3w3p
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2024-24762