Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUSTSEC-2022-0055: No default limit put on request bodies #895

Closed
github-actions bot opened this issue Nov 8, 2022 · 2 comments
Closed

RUSTSEC-2022-0055: No default limit put on request bodies #895

github-actions bot opened this issue Nov 8, 2022 · 2 comments
Labels
blocked Blocked on something. The author is responsible for making progress and unblocking it.

Comments

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

No default limit put on request bodies

Details
Package axum-core
Version 0.1.2
URL tokio-rs/axum#1346
Date 2022-08-31
Patched versions >=0.2.8, <0.3.0-rc.1,>=0.3.0-rc.2

&lt;bytes::Bytes as axum_core::extract::FromRequest&gt;::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 &lt;= 0.5.15 and 0.6.0.rc.1. axum &gt;= 0.5.16 and
&gt;= 0.6.0.rc.2 does have the fix and are not vulnerable.

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

See advisory page for additional details.

@NicolaLS NicolaLS added the blocked Blocked on something. The author is responsible for making progress and unblocking it. label Nov 9, 2022
@NicolaLS
Copy link
Contributor

NicolaLS commented Nov 9, 2022

blocked on djc/askama#716

@dpc
Copy link
Contributor

dpc commented Apr 19, 2023

> cargo tree | grep axum
│   │   │   │   │   │   ├── axum v0.6.15
│   │   │   │   │   │   │   ├── axum-core v0.3.4
│   │   │   │   │   ├── axum v0.6.15 (*)
│   │   │   │   │   ├── axum-macros v0.3.7 (proc-macro)
│   ├── askama_axum v0.2.1
│   │   ├── axum-core v0.3.4 (*)
│   ├── axum v0.6.15 (*)
│   ├── axum-macros v0.3.7 (proc-macro) (*)
├── axum v0.6.15 (*)
├── axum-macros v0.3.7 (proc-macro) (*)

@dpc dpc closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on something. The author is responsible for making progress and unblocking it.
Projects
None yet
Development

No branches or pull requests

2 participants