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 zarrs

Dependencies

(51 total, 2 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 async-generic^1.1.21.1.2up to date
 async-lock^3.4.03.4.2up to date
 async-trait^0.1.740.1.89up to date
 base64^0.22.10.22.1up to date
 blosc-src^0.3.60.3.8up to date
 bytemuck^1.14.01.25.0up to date
 bytes ⚠️^1.7.01.11.1maybe insecure
 bzip2^0.6.00.6.1up to date
 chrono^0.4.390.4.44up to date
 crc32c^0.6.50.6.8up to date
 derive_more^2.0.02.1.1up to date
 dlpark^0.6.00.6.0up to date
 flate2^1.1.11.1.9up to date
 float8^0.5.00.7.0out of date
 futures^0.3.290.3.32up to date
 gdeflate-sys^0.4.10.4.1up to date
 getrandom^0.3.10.4.1out of date
 half^2.4.12.7.1up to date
 inventory^0.3.210.3.22up to date
 itertools^0.14.00.14.0up to date
 itoa^1.0.151.0.17up to date
 jiff^0.2.150.2.21up to date
 log^0.4.280.4.29up to date
 lru^0.16.00.16.3up to date
 moka^0.12.80.12.13up to date
 ndarray^0.17.10.17.2up to date
 num^0.4.10.4.3up to date
 num-complex^0.4.30.4.6up to date
 paste^1.0.151.0.15up to date
 pco^1.0.01.0.1up to date
 quick_cache^0.6.160.6.18up to date
 rayon^1.10.01.11.0up to date
 rayon_iter_concurrent_limit^0.2.00.2.0up to date
 serde^1.0.2031.0.228up to date
 serde_json^1.0.711.0.149up to date
 simd-adler32^0.3.70.3.8up to date
 thiserror^2.0.122.0.18up to date
 thread_local^1.1.81.1.9up to date
 unsafe_cell_slice^0.2.00.2.2up to date
 uuid^1.1.01.21.0up to date
 zarrs_chunk_grid^0.5.00.5.0up to date
 zarrs_chunk_key_encoding^0.2.00.2.0up to date
 zarrs_codec^0.2.00.2.0up to date
 zarrs_data_type^0.9.00.9.0up to date
 zarrs_filesystem^0.3.90.3.9up to date
 zarrs_metadata^0.7.20.7.4up to date
 zarrs_metadata_ext^0.4.10.4.1up to date
 zarrs_plugin^0.4.10.4.1up to date
 zarrs_storage^0.4.20.4.2up to date
 zfp-sys^0.4.20.4.2up to date
 zstd^0.13.30.13.3up to date

Dev dependencies

(10 total, all up-to-date)

CrateRequiredLatestStatus
 chrono^0.4.390.4.44up to date
 criterion^0.8.10.8.2up to date
 object_store^0.130.13.1up to date
 serial_test^3.2.03.4.0up to date
 tempfile^33.26.0up to date
 testing_logger^0.1.10.1.1up to date
 tokio^1.34.01.49.0up to date
 walkdir^2.3.22.5.0up to date
 zarrs_filesystem^0.3.90.3.9up to date
 zarrs_object_store^0.6.20.6.2up 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.