GHSA-m77f-652q-wwp4

Suggest an improvement
Source
https://github.com/advisories/GHSA-m77f-652q-wwp4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-m77f-652q-wwp4/GHSA-m77f-652q-wwp4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m77f-652q-wwp4
Aliases
Published
2022-09-15T03:25:15Z
Modified
2023-11-08T04:09:34.414125Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
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.

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.

Database specific
{
    "nvd_published_at": null,
    "github_reviewed_at": "2022-09-15T03:25:15Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-770"
    ]
}
References

Affected packages

crates.io / axum-core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.2.8

crates.io / axum-core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.3.0-rc.1
Fixed
0.3.0-rc.2

Affected versions

0.*

0.3.0-rc.1