# CVE-2024-24762: PYSEC-2026-1850 - python-multipart vulnerable to Content-Type Header ReDoS

Source: https://junglewise.ai/threats/cve-2024-24762-python-multipart-content-type-header-redos  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2024-24762 · Severity: low · CVSS 3.1 · Published 2026-07-07

python-multipart is a library used by web frameworks like FastAPI and Starlette to parse form data from HTTP requests. A malicious Content-Type header with a specially crafted option can trigger excessive CPU consumption in the regex parser, causing the server to become unresponsive and unable to handle requests (denial of service).

Technologies: [python-multipart (PyPI)](https://junglewise.ai/threats/technologies/python-multipart). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-24762 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-24762 being exploited in the wild.

**How severe is CVE-2024-24762?** Low severity, with a CVSS score of 3.1, published 7 July 2026.

**Which products and versions are affected?** fastapi (PyPI) ECOSYSTEM:introduced=0,fixed=0.109.1, GIT:introduced=0,fixed=9d34ad0ee8a0dfbbcce06f76c2d5d851085024fc|ECOSYSTEM:introduced=0,fixed=0.109.1; python-multipart (PyPI) ECOSYSTEM:introduced=0,fixed=0.0.7.

**Is there a fix for CVE-2024-24762?** Yes. fastapi (PyPI): upgrade to 0.109.1 or later; python-multipart (PyPI): upgrade to 0.0.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-24762 attacked?** It is attacked over the network.

**Am I affected by CVE-2024-24762?** Check whether you run fastapi (PyPI) or python-multipart (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fastapi (PyPI): upgrade to 0.109.1 or later

  ```sh
  pip install "fastapi>=0.109.1"
  ```

- python-multipart (PyPI): upgrade to 0.0.7 or later

  ```sh
  pip install "python-multipart>=0.0.7"
  ```


## Technical details

A regular expression vulnerability (ReDoS) exists in the parse_options_header function when parsing HTTP Content-Type headers. An attacker sends a POST request with a malformed Content-Type header containing repeated backslashes and special characters (e.g., `Content-Type: application/x-www-form-urlencoded; !=\"\\\...\\`) that triggers catastrophic backtracking in the regex engine. This vulnerability only affects applications that parse form data (not JSON); an attacker can exhaust CPU resources on a single worker thread indefinitely, and with multiple requests can DoS the entire server. The vulnerability was patched in version 0.0.7.

## Affected products

- Andrew Godwin et al. python-multipart <=0.0.6

## Identifiers

- CVE-2024-24762
- GHSA-2jv5-9r88-3w3p
- GHSA-qf9m-vfgh-m389
- PYSEC-2024-38
- PYSEC-2026-1850

## Timeline

- 2024-02-12: disclosed
- 2024-02-12: patched: patched in version 0.0.7

## References

- [https://github.com/Kludex/python-multipart/security/advisories/GHSA-2jv5-9r88-3w3p](https://github.com/Kludex/python-multipart/security/advisories/GHSA-2jv5-9r88-3w3p)

## Related threats

- [PYSEC-2026-1851 - Denial of service (DoS) via deformation `multipart/form-data` boundary](https://junglewise.ai/threats/cve-2024-53981-denial-of-service-dos-via-deformation-multipart-form-data)
- [Kludex Python-Multipart denial of service via negative Content-Length](https://junglewise.ai/threats/cve-2026-53540-kludex-python-multipart-denial-of-service-via-negative-content)
- [Kludex Python-Multipart denial of service in QuerystringParser](https://junglewise.ai/threats/cve-2026-53539-kludex-python-multipart-denial-of-service-in-querystringparser)
- [Kludex Python-Multipart parameter smuggling via semicolon separator](https://junglewise.ai/threats/cve-2026-53538-kludex-python-multipart-parameter-smuggling-via-semicolon)
- [Kludex Python-Multipart parameter smuggling in Content-Disposition header](https://junglewise.ai/threats/cve-2026-53537-kludex-python-multipart-parameter-smuggling-in-content)
