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 zenoh

Dependencies

(44 total, 6 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 ahash^0.8.120.8.12up to date
 arc-swap^1.7.11.9.0up to date
 async-trait^0.1.890.1.89up to date
 bytes ⚠️^1.11.01.11.1maybe insecure
 const_format^0.2.340.2.35up to date
 flate2^1.1.51.1.9up to date
 flume^0.11.10.12.0out of date
 futures^0.3.310.3.32up to date
 git-version^0.3.90.3.9up to date
 itertools^0.14.00.14.0up to date
 json5^0.4.11.3.1out of date
 lazy_static^1.5.01.5.0up to date
 nonempty-collections^0.3.11.3.0out of date
 once_cell^1.21.31.21.4up to date
 petgraph^0.8.30.8.3up to date
 phf^0.13.10.13.1up to date
 rand^0.8.50.10.0out of date
 serde^1.0.2251.0.228up to date
 serde_json^1.0.1451.0.149up to date
 socket2^0.5.70.6.3out of date
 tokio^1.47.11.51.0up to date
 tokio-util^0.7.160.7.18up to date
 tracing^0.1.410.1.44up to date
 uhlc^0.8.00.9.0out of date
 vec_map^0.8.20.8.2up to date
 zenoh-buffers=1.8.01.8.0up to date
 zenoh-codec=1.8.01.8.0up to date
 zenoh-collections=1.8.01.8.0up to date
 zenoh-config=1.8.01.8.0up to date
 zenoh-core=1.8.01.8.0up to date
 zenoh-keyexpr=1.8.01.8.0up to date
 zenoh-link=1.8.01.8.0up to date
 zenoh-link-commons=1.8.01.8.0up to date
 zenoh-macros=1.8.01.8.0up to date
 zenoh-plugin-trait=1.8.01.8.0up to date
 zenoh-protocol=1.8.01.8.0up to date
 zenoh-result=1.8.01.8.0up to date
 zenoh-runtime=1.8.01.8.0up to date
 zenoh-shm=1.8.01.8.0up to date
 zenoh-stats=1.8.01.8.0up to date
 zenoh-sync=1.8.01.8.0up to date
 zenoh-task=1.8.01.8.0up to date
 zenoh-transport=1.8.01.8.0up to date
 zenoh-util=1.8.01.8.0up to date

Dev dependencies

(4 total, all up-to-date)

CrateRequiredLatestStatus
 libc^0.2.1750.2.184up to date
 test-case^3.3.13.3.1up to date
 tokio^1.47.11.51.0up to date
 zenoh-protocol=1.8.01.8.0up to 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.