{"id":"GHSA-m77f-652q-wwp4","summary":"axum-core has no default limit put on request bodies","details":"`\u003cbytes::Bytes as axum_core::extract::FromRequest\u003e::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.\n\nThis also applies to these extractors which used `Bytes::from_request` internally:\n- `axum::extract::Form`\n- `axum::extract::Json`\n- `String`\n\nThe fix is also in `axum-core` `0.3.0.rc.2` but `0.3.0.rc.1` _is_ vulnerable.\n\nBecause `axum` depends on `axum-core` it is vulnerable as well. The vulnerable versions of `axum` are `\u003c= 0.5.15` and `0.6.0.rc.1`. `axum` `\u003e= 0.5.16` and `\u003e= 0.6.0.rc.2` does have the fix and are not vulnerable.\n\nThe patched versions will set a 2 MB limit by default.\n","aliases":["CVE-2022-3212","RUSTSEC-2022-0055"],"modified":"2023-11-08T04:09:34.414125Z","published":"2022-09-15T03:25:15Z","database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-770"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2022-09-15T03:25:15Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-3212"},{"type":"WEB","url":"https://github.com/tokio-rs/axum/pull/1346"},{"type":"PACKAGE","url":"https://github.com/tokio-rs/axum"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2022-0055.html"}],"affected":[{"package":{"name":"axum-core","ecosystem":"crates.io","purl":"pkg:cargo/axum-core"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.2.8"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-m77f-652q-wwp4/GHSA-m77f-652q-wwp4.json"}},{"package":{"name":"axum-core","ecosystem":"crates.io","purl":"pkg:cargo/axum-core"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0-rc.1"},{"fixed":"0.3.0-rc.2"}]}],"versions":["0.3.0-rc.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-m77f-652q-wwp4/GHSA-m77f-652q-wwp4.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}