RUSTSEC-2022-0055

Source
https://rustsec.org/advisories/RUSTSEC-2022-0055
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2022-0055.json
Aliases
Published
2022-08-31T12:00:00Z
Modified
2023-11-08T04:09:34.414125Z
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.

This also applies to these extractors which used Bytes::from_request internally: - axum::extract::Form - axum::extract::Json - String

The fix is also in axum-core 0.3.0.rc.2 but 0.3.0.rc.1 is vulnerable.

Because 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.

The patched versions will set a 2 MB limit by default.

References

Affected packages

crates.io / axum-core

Package

Name
axum-core

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.2.8
Introduced
0.3.0-rc.1
Fixed
0.3.0-rc.2

Ecosystem specific

{
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": [
        "denial-of-service"
    ]
}