{"id":"CVE-2021-27378","aliases":["AZL-41851","EUVD-2021-1910","GHSA-w7j2-35mf-95p7","RUSTSEC-2021-0023","UBUNTU-CVE-2021-27378","openSUSE-SU-2024:11751-1"],"status":"published","title":"Incorrect check on buffer length in rand_core","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01238,"percentile":0.69488,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-131","CWE-330"],"published":"2021-02-12T12:00:00Z","modified":"2026-10-24T10:30:20Z","fixes":[{"ecosystem":"crates.io","package":"rand_core","fixed_in":["0.6.2"],"sources":["ghsa","osv"]},{"ecosystem":"Azure Linux:3","package":"librsvg2","fixed_in":["2.58.1-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.6.0"},{"fixed":"0.6.2"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"librsvg2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.58.1-1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"SEMVER","events":[{"introduced":"0.6.0"},{"fixed":"0.6.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"SEMVER","events":[{"introduced":"0.6.0"},{"fixed":"0.6.2"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.0-1","0.5.1-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.1-1","0.6.3-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.3-2","0.6.4-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.4-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.4-2","0.10.0-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.4-2"]}],"products":[{"vendor":"rand_core_project","product":"rand_core"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0023.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27378","tags":["web","advisory"]},{"url":"https://github.com/rust-random/rand/pull/1096","tags":["web"]},{"url":"https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R19","tags":["web"]},{"url":"https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R28","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w7j2-35mf-95p7"},{"url":"https://github.com/rust-random/rand","tags":["package"]},{"url":"https://crates.io/crates/rand_core","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-27378","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-27378","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2020-35905","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-36465","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-27378","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-32714","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-32715","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-38191","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-45710","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-27378","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.","status":"published","published":"2021-02-18T03:35:07Z","modified":"2024-08-03T20:48:16.403Z","updated_at":"2026-11-02T14:33:04.360272Z"}],"euvd":[{"id":"EUVD-2021-1910","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.","status":"published","published":"2021-02-18T03:35:07Z","modified":"2024-08-03T20:48:16Z","updated_at":"2026-11-03T03:24:49.368497Z"}],"ghsa":[{"id":"GHSA-w7j2-35mf-95p7","title":"Incorrect check on buffer length in rand_core","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.\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.","status":"published","published":"2021-08-25T20:52:16Z","modified":"2023-06-13T20:31:09Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T14:36:54.225318Z"}],"nvd":[{"id":"CVE-2021-27378","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.","status":"published","published":"2021-02-18T04:15:11.823Z","modified":"2026-06-17T03:44:44.323Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T14:06:50.031227Z"}],"osv":[{"id":"AZL-41851","title":"CVE-2021-27378 affecting package librsvg2 for versions less than 2.58.1-1","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.","status":"published","published":"2021-02-18T04:15:11Z","modified":"2026-04-21T04:50:05.360822Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:28:04.893995Z"},{"id":"CVE-2021-27378","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.","status":"published","published":"2021-02-18T04:15:11.823Z","modified":"2026-10-24T10:30:20.715907156Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:18.778776Z"},{"id":"GHSA-w7j2-35mf-95p7","title":"Incorrect check on buffer length in rand_core","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.\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.","status":"published","published":"2021-08-25T20:52:16Z","modified":"2023-11-08T04:05:24.55151Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T15:46:58.401149Z"},{"id":"RUSTSEC-2021-0023","title":"Incorrect check on buffer length when seeding RNGs","description":"Summary: rand_core::le::read_u32_into and read_u64_into have incorrect checks on the source buffer length, allowing the destination buffer to be under-filled.\n\nImplications: some downstream RNGs, including Hc128Rng (but not the more widely used ChaCha*Rng), allow seeding using the SeedableRng::from_seed trait-function with too short keys.","status":"published","published":"2021-02-12T12:00:00Z","modified":"2023-11-08T04:05:24.55151Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:39.492624Z"},{"id":"UBUNTU-CVE-2021-27378","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.","status":"published","published":"2021-02-18T04:15:00Z","modified":"2026-10-17T12:57:12.351378337Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:26.779273Z"},{"id":"openSUSE-SU-2024:11751-1","title":"afterburn-5.0.0-6.1 on GA media","description":"These are all security issues fixed in the afterburn-5.0.0-6.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:42:02.541488Z","updated_at":"2026-11-02T16:58:35.195147Z"}]}}
