What’s Vulnerable › Vulnerabilities
CVE-2022-3212: DoS in axum-core due to missing request size limit
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-09-14 · updated 2026-06-17
- Weakness: CWE-770
Description
<bytes::Bytes as axum_core::extract::FromRequest>::from_request would not, by default, set a limit for the size of the request body. That meant if a malicious peer would send a very large (or infinite) body your server might run out of memory and crash. This also applies to these extractors which used Bytes::from_request internally: axum::extract::Form axum::extract::Json String
Affected products
- tokio-rs axum-core: before 0.2.8; 0.3.0-rc1 — fixed in 0.2.8
How to fix
Upgrade to a fixed version: tokio-rs axum-core 0.2.8. Check the vendor advisory for mitigations.
References
- https://research.jfrog.com/vulnerabilities/axum-core-dos/
- https://rustsec.org/advisories/RUSTSEC-2022-0055.html
- https://research.jfrog.com/vulnerabilities/axum-core-dos/
- https://rustsec.org/advisories/RUSTSEC-2022-0055.html
Get alerted when CVE-2022-3212 or the next vulnerability affects your stack