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 scylla-cql

Dependencies

(15 total, 7 outdated, 4 possibly insecure)

CrateRequiredLatestStatus
 async-trait^0.1.570.1.89up to date
 bigdecimal^0.2.00.4.10out of date
 byteorder^1.3.41.5.0up to date
 bytes ⚠️^1.0.11.11.1maybe insecure
 chrono ⚠️^0.40.4.44maybe insecure
 lz4_flex ⚠️^0.9.20.13.0out of date
 num-bigint^0.30.4.6out of date
 num_enum^0.50.7.6out of date
 scylla-macros^0.2.01.5.0out of date
 secrecy^0.7.00.10.3out of date
 serde^1.01.0.228up to date
 snap^1.01.1.1up to date
 thiserror^1.02.0.18out of date
 tokio ⚠️^1.121.50.0maybe insecure
 uuid^1.01.23.0up to date

Dev dependencies

(1 total, 1 outdated)

CrateRequiredLatestStatus
 criterion^0.30.8.2out of date

Security Vulnerabilities

chrono: Potential segfault in `localtime_r` invocations

RUSTSEC-2020-0159

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

Workarounds

No workarounds are known.

References

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.

lz4_flex: Decompressing invalid data can leak information from uninitialized memory or reused output buffer

RUSTSEC-2026-0041

Decompressing invalid LZ4 data with the block API can leak data from uninitialized memory, or leak content from previous decompression operations when reusing an output buffer.

The LZ4 block format defines a "match copy operation" which duplicates previously written data or data from a user-supplied dict. The position of that data is defined by an offset. lz4_flex did not properly validate offset values, causing it to copy data from outside the initialized portion of the output buffer.

Two scenarios are affected:

  • Decompressing with the unsafe implementation (safe-decode feature flag disabled, which is the default): can leak content of uninitialized memory as part of the decompressed result.
  • Decompressing into a reused, user-supplied output buffer (also affects safe-decode): can leak the previous contents of the output buffer as part of the decompressed result.

Only the block-based APIs are affected. All frame APIs are unaffected.

The flaw was corrected in versions 0.11.6 and 0.12.1 by properly validating offset values during decompression.

If upgrading is not possible, the issue can be mitigated by zeroing the output buffer before each call to the affected functions and enabling the safe-decode feature flag.