{"id":"CVE-2021-27378","aliases":["GHSA-w7j2-35mf-95p7","RUSTSEC-2021-0023"],"url":"https://o3.security/vulnerability/CVE-2021-27378","summary":"Incorrect check on buffer length in rand_core","details":"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.\n\nBecause read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data.","published":"2021-02-18T04:15:11.823Z","modified":"2026-10-24T10:30:20.715907156Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.01253,"percentile":0.70216,"asOf":"2026-11-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"rand_core","fixedVersion":"0.6.2"}],"fix":{"url":"https://github.com/rust-random/rand/pull/1096","label":"rust-random/rand#1096"},"references":[{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0023.html"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27378"},{"type":"WEB","url":"https://github.com/rust-random/rand/pull/1096"},{"type":"PACKAGE","url":"https://github.com/rust-random/rand"},{"type":"WEB","url":"https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R19"},{"type":"WEB","url":"https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R28"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-24T10:30:20.715907156Z"}}