CVE-2024-24762
python-multipart vulnerable to content-type header Regular expression Denial of Service
Reported by github_m · Published February 5, 2024
python-multipart is fixed in 0.0.7 (GitHub Packages)
`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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python-multipart | GitHub Packages | 0.0.7 |
| fastapi | PyPI | 9d34ad0ee8a0dfbbcce06f76c2d5d851085024fc, 0.109.1, 0.109.0 |
| python-multipart | PyPI | 0.0.7 |
| starlette | PyPI | 0.36.1 |
| startlette | GitHub Packages | 0.36.2 |
| fastapi | GitHub Packages | 0.109.1 |
| reflex | Wolfi | 0.4.0-r0 |
| reflex | Chainguard | 0.4.0-r0 |
| python-multipart | fastapiexpert | 0.0.7 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Kludex | python-multipart | 0 |
| tiangolo | fastapi | 0 |
| encode | starlette | 0 |
| Kludex | python-multipart | 0 |
| PyPI | fastapi | 0 |
| PyPI | starlette | 0 |
| fastapiexpert | python-multipart | |
| wolfi | reflex | 0 |
| chainguard | reflex | 0 |
| encode | starlette | 0 |
| tiangolo | fastapi | 0 |
| PyPI | python-multipart | 0 |
Timeline
- Feb 5, 2024 CVE Published
- Feb 8, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (12 in total, the first dated here)
- Jan 16, 2026 Security Advisory
- Feb 4, 2026 CVE Rejected
- Feb 4, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-24762
vulnetix vdb fixes CVE-2024-24762
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-24762/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-2jv5-9r88-3w3p x_refsource_CONFIRM
- https://github.com/Kludex/python-multipart/commit/20f0ef6b4e4caf7d69a667c54dff57fe467109a4 x_refsource_MISC
- https://github.com/tiangolo/fastapi/security/advisories/GHSA-qf9m-vfgh-m389 x_refsource_MISC
- https://github.com/encode/starlette/security/advisories/GHSA-93gm-qmq6-w238 x_refsource_MISC
- https://github.com/andrew-d/python-multipart/blob/d3d16dae4b061c34fe9d3c9081d9800c49fc1f7a/multipart/multipart.py#L72-L74 x_refsource_MISC
- https://github.com/encode/starlette/commit/13e5c26a27f4903924624736abd6131b2da80cc5 x_refsource_MISC
- https://github.com/tiangolo/fastapi/commit/9d34ad0ee8a0dfbbcce06f76c2d5d851085024fc x_refsource_MISC
- https://github.com/tiangolo/fastapi/releases/tag/0.109.1 x_refsource_MISC
- https://github.com/advisories/GHSA-qf9m-vfgh-m389 advisory
- https://github.com/github/advisory-database/pull/4829 advisory
- https://github.com/Kludex/python-multipart url
- https://nvd.nist.gov/vuln/detail/CVE-2024-24762 advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/fastapi/PYSEC-2024-38.yaml advisory
- https://github.com/advisories/GHSA-2jv5-9r88-3w3p advisory