This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate axum

Dependencies

(27 total, 13 outdated, 3 possibly insecure)

CrateRequiredLatestStatus
 async-trait^0.1.430.1.89up to date
 axum-core ⚠️^0.1.10.5.6out of date
 base64^0.130.22.1out of date
 bitflags^1.02.11.0out of date
 bytes ⚠️^1.01.11.1maybe insecure
 futures-util^0.30.3.32up to date
 headers^0.30.4.1out of date
 http^0.2.51.4.0out of date
 http-body^0.4.41.0.1out of date
 hyper^0.14.141.8.1out of date
 matchit^0.4.60.9.1out of date
 memchr^2.4.12.8.0up to date
 mime^0.3.160.3.17up to date
 multer^2.0.03.1.0out of date
 percent-encoding^2.12.3.2up to date
 pin-project-lite^0.2.70.2.17up to date
 serde^1.01.0.228up to date
 serde_json^1.01.0.149up to date
 serde_urlencoded^0.70.7.1up to date
 sha-1^0.100.10.1up to date
 sync_wrapper^0.1.11.0.2out of date
 tokio ⚠️^11.50.0maybe insecure
 tokio-tungstenite^0.160.29.0out of date
 tower^0.4.110.5.3out of date
 tower-http^0.2.00.6.8out of date
 tower-layer^0.30.3.3up to date
 tower-service^0.30.3.3up to date

Dev dependencies

(11 total, 4 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 anyhow^1.01.0.102up to date
 futures^0.30.3.32up to date
 reqwest^0.110.13.2out of date
 serde^1.01.0.228up to date
 serde_json^1.01.0.149up to date
 tokio ⚠️^1.6.11.50.0maybe insecure
 tokio-stream^0.10.1.18up to date
 tower^0.4.100.5.3out of date
 tower-http^0.2.00.6.8out of date
 tracing^0.10.1.44up to date
 uuid^0.81.22.0out of date

Security Vulnerabilities

axum-core: No default limit put on request bodies

RUSTSEC-2022-0055

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

tokio: reject_remote_clients Configuration corruption

RUSTSEC-2023-0001

On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.

This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.

The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.

Workarounds

Ensure that pipe_mode is set first after initializing a ServerOptions. For example:

let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);

bytes: Integer overflow in `BytesMut::reserve`

RUSTSEC-2026-0007

In the unique reclaim path of BytesMut::reserve, the condition

if v_capacity >= new_cap + offset

uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB.

This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks.

PoC

use bytes::*;

fn main() {
    let mut a = BytesMut::from(&b"hello world"[..]);
    let mut b = a.split_off(5);

    // Ensure b becomes the unique owner of the backing storage
    drop(a);

    // Trigger overflow in new_cap + offset inside reserve
    b.reserve(usize::MAX - 6);

    // This call relies on the corrupted cap and may cause UB & HBO
    b.put_u8(b'h');
}

Workarounds

Users of BytesMut::reserve are only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.