All reports
Critical

Incorrect check on buffer length in rand_core

Affected versions

Version ranges need review.

Rust / Cargorand_core
Affected versions
>=0.6.0 <0.6.2
Fixed version
0.6.2
Rust / Cargorand_core
Affected versions
>= 0.6.0, < 0.6.2
Fixed version
0.6.2

Exploitation

CVE-2021-27378

Probability of exploitation in the next 30 days: 1.25%

FIRST EPSS · 2026-11-20

Description

An issue was discovered in the rand_core crate before 0.6.2 for Rust. Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data. The vulnerability was introduced in v0.6.0. The advisory doesn't apply to earlier minor version numbers.

Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data.

Links

Credits

  • rillian