CVE-2022-3212: Axum core Axum-core Has No Default Limit Vulnerability
HIGHCVE-2022-3212 is a HIGH (CVSS 7.5) axum-core has no default limit vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Axum core libraries in the crates.io ecosystem. The issue involves axum-core has no default limit put on request bodies. Remediation is available by upgrading affected packages to version 0.2.8, 0.3.0-rc.2.
CVE-2022-3212 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2022-3212
To remediate this vulnerability, upgrade all affected Axum core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade axum-core to 0.2.8
Upgrade axum-core to 0.3.0-rc.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for axum-core
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-3212, inspect your project dependencies for Axum core:
inspect dependencies for axum-core
Analyze the terminal output to locate any version of Axum core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Axum core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-3212 Affected Axum core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
axum-core
|
crates.io |
< 0.2.8
|
0.2.8
|
|
axum-core
|
crates.io |
≥ 0.3.0-rc.1
< 0.3.0-rc.2
All 1 versions
0.3.0-rc.1
|
0.3.0-rc.2
|
References
Frequently Asked Questions
What is CVE-2022-3212?
Which Axum core versions are affected?
What version fixes CVE-2022-3212?
Is axum-core affected?
What is the CVSS score of CVE-2022-3212?
What CWE is associated with CVE-2022-3212?
How can I check crates.io dependencies for CVE-2022-3212?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m77f-652q-wwp4",
"modified" : "2022-09-19T19:22:47Z",
"published" : "2022-09-15T03:25:15Z",
"aliases" : [ "CVE-2022-3212" ],
"summary" : "axum-core has no default limit put on request bodies",
"details" : "`<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.\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 `<= 0.5.15` and `0.6.0.rc.1`. `axum` `>= 0.5.16` and `>= 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "axum-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "axum-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.0-rc.1"
}, {
"fixed" : "0.3.0-rc.2"
} ]
} ],
"versions" : [ "0.3.0-rc.1" ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-15T03:25:15Z",
"nvd_published_at" : null
}
}