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 fastwebsockets

Dependencies

(15 total, 4 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 async-trait^0.10.1.89up to date
 axum-core^0.5.00.5.6up to date
 base64^0.21.00.22.1out of date
 bytes ⚠️^1.5.01.11.1maybe insecure
 http^11.4.0up to date
 http-body-util^0.1.00.1.3up to date
 hyper^11.9.0up to date
 hyper-util^0.1.00.1.20up to date
 pin-project^1.0.81.1.11up to date
 rand^0.8.40.10.0out of date
 sha1^0.10.50.11.0out of date
 simdutf8^0.1.40.1.5up to date
 thiserror^1.0.402.0.18out of date
 tokio^1.25.01.50.0up to date
 utf-8^0.7.50.7.6up to date

Dev dependencies

(13 total, 5 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 anyhow^1.0.711.0.102up to date
 assert2^0.3.40.4.0out of date
 axum^0.8.10.8.8up to date
 bytes ⚠️^1.4.01.11.1maybe insecure
 criterion^0.4.00.8.2out of date
 http-body-util^0.1.00.1.3up to date
 hyper^11.9.0up to date
 hyper-util^0.1.00.1.20up to date
 rustls-pemfile^1.02.2.0out of date
 tokio^1.25.01.50.0up to date
 tokio-rustls^0.24.00.26.4out of date
 trybuild^1.0.801.0.116up to date
 webpki-roots^0.23.01.0.6out of date

Security Vulnerabilities

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.