CVE-2024-24762 python-multipart vulnerable to content-type header Regular expression Denial of Service
An attacker can cause a denial of service in applications using python-multipart by sending a crafted Content-Type header that triggers excessive CPU usage.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-24762?
CVE-2024-24762 is a high-severity denial of service vulnerability in Kludex fastapi, published on 5 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
`python-multipart` is a streaming multipart parser for Python. 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, leading to regular expression denial of service. This vulnerability has been patched in version 0.0.7.
Which versions are affected by CVE-2024-24762?
6 open source packages ship an affected version, including fastapi and python-multipart. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
fastapi PyPI | All versions | 0.109.1 |
fastapi PyPI | All versions | 0.109.1 |
fastapi PyPI | All versions | 0.109.1 |
python-multipart PyPI | All versions | 0.0.7 |
python-multipart PyPI | All versions | 0.0.7 |
python-multipart PyPI | All versions | 0.0.7 |
Linux distribution packages (2)
python-fastapi openSUSE:Tumbleweed | All versions | 0.138.0-2.1 |
python-python-multipart openSUSE:Tumbleweed | All versions | 0.0.32-1.3 |
Products include Fastapiexpert Python-Multipart.
How do I fix CVE-2024-24762?
Upgrade fastapi to 0.109.1 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-24762 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24762 exists.
Other vulnerabilities in Kludex fastapi
- CVE-2026-24486 Python-Multipart has Arbitrary File Write via Non-Default Configuration
- CVE-2026-53539 Python-Multipart: Quadratic-time querystring parsing with semicolon separators causes CPU denial of service
- CVE-2026-40347 Python-Multipart affected by Denial of Service via large multipart preamble or epilogue data
- CVE-2026-53537 Python-Multipart: Content-Disposition parameter smuggling via RFC 2231/5987 extended parameters
- CVE-2026-53538 Python-Multipart: Semicolon treated as querystring field separator enables parameter smuggling
Sources
Also known as CLSA-2025-1755043914, CLSA-2025-1755735112, CLSA-2025-1758586346, CLSA-2026-1787305298, DEBIAN-CVE-2024-24762, GHSA-2jv5-9r88-3w3p and 10 more.