rustsec-2022-0055
Vulnerability from osv_rustsec
Published
2022-08-31 12:00
Modified
2023-06-13 13:10
Summary
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.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "denial-of-service"
        ],
        "cvss": null,
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "axum-core",
        "purl": "pkg:cargo/axum-core"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.2.8"
            },
            {
              "introduced": "0.3.0-rc.1"
            },
            {
              "fixed": "0.3.0-rc.2"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "CVE-2022-3212",
    "GHSA-m77f-652q-wwp4"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "`\u003cbytes::Bytes as axum_core::extract::FromRequest\u003e::from_request` would not, by\ndefault, set a limit for the size of the request body. That meant if a malicious\npeer would send a very large (or infinite) body your server might run out of\nmemory and crash.\n\nThis also applies to these extractors which used `Bytes::from_request`\ninternally:\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\nversions of `axum` are `\u003c= 0.5.15` and `0.6.0.rc.1`. `axum` `\u003e= 0.5.16` and\n`\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.",
  "id": "RUSTSEC-2022-0055",
  "modified": "2023-06-13T13:10:24Z",
  "published": "2022-08-31T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/axum-core"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2022-0055.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tokio-rs/axum/pull/1346"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "No default limit put on request bodies"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…