{"id":"CVE-2020-25576","aliases":["AZL-46540","DEBIAN-CVE-2020-25576","EUVD-2021-1804","GHSA-mmc9-pwm7-qj5w","RUSTSEC-2019-0035","UBUNTU-CVE-2020-25576"],"status":"published","title":"Unaligned memory access in rand_core","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","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-10","score":0.01602,"percentile":0.76025,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-704"],"published":"2019-04-19T12:00:00Z","modified":"2026-10-26T12:02:40Z","fixes":[{"ecosystem":"crates.io","package":"rand_core","fixed_in":["0.4.2","0.3.1"],"sources":["ghsa","osv"]},{"ecosystem":"Azure Linux:3","package":"kata-containers","fixed_in":["3.2.0.azl2-3"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"rust-rand-core","fixed_in":["0.5.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"rust-rand-core","fixed_in":["0.5.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rust-rand-core","fixed_in":["0.5.0-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.0"},{"fixed":"0.4.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.1"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"kata-containers","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.0.azl2-3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rust-rand-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.0"},{"fixed":"0.4.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rand_core","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.1"},{"introduced":"0.4.0-0"},{"fixed":"0.4.2"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-rand-core-0.2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.2-1","0.2.2-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-rand-core-0.3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.0-1","0.3.0-2"]}],"products":[{"vendor":"rust-random","product":"rand"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2019-0035.html","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/rust-random/rand/security/advisories/GHSA-mmc9-pwm7-qj5w","tags":["web"]},{"url":"https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-mmc9-pwm7-qj5w"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-25576","tags":["web"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-25576","tags":["advisory"]},{"url":"https://github.com/rust-random/rand","tags":["package"]},{"url":"https://crates.io/crates/rand_core","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-25576","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-25576","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-25576","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T18:16:00Z","modified":"2024-08-04T15:33:05.759Z","updated_at":"2026-11-02T14:35:48.52216Z"}],"euvd":[{"id":"EUVD-2021-1804","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T18:16:00Z","modified":"2024-08-04T15:33:05Z","updated_at":"2026-11-03T03:07:17.317062Z"}],"ghsa":[{"id":"GHSA-mmc9-pwm7-qj5w","title":"Unaligned memory access in rand_core","description":"### Impact\nAffected versions of this crate violated alignment when casting byte slices to integer slices, resulting in undefined behavior. `rand_core::BlockRng::next_u64` and `rand_core::BlockRng::fill_bytes` are affected.\n\n### Patches\nThe flaw was corrected by Ralf Jung and Diggory Hardy for `rand_core \u003e= 0.4.2`.\n\n### Workarounds\nNone.\n\n### References\nSee [Rand's changelog](https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06).\n\n### For more information\nIf you have any questions or comments about this advisory, [open an issue in the Rand repository](https://github.com/rust-random/rand/issues/new/choose).\n\n","status":"published","published":"2021-08-25T20:56:50Z","modified":"2023-01-09T05:05:13Z","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-704"],"updated_at":"2026-11-02T14:36:11.367194Z"}],"nvd":[{"id":"CVE-2020-25576","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T19:15:11.473Z","modified":"2026-08-19T19:21:55.07Z","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-704"],"updated_at":"2026-11-02T14:06:14.981587Z"}],"osv":[{"id":"AZL-46540","title":"CVE-2020-25576 affecting package kata-containers for versions less than 3.2.0.azl2-3","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T19:15:11Z","modified":"2026-08-28T17:56:36.613122Z","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:05.694722Z"},{"id":"CVE-2020-25576","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T19:15:11.473Z","modified":"2026-10-24T10:30:32.266889513Z","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:15.879068Z"},{"id":"DEBIAN-CVE-2020-25576","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T19:15:11.473Z","modified":"2026-10-26T12:02:40.317104613Z","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:45:33.729655Z"},{"id":"GHSA-mmc9-pwm7-qj5w","title":"Unaligned memory access in rand_core","description":"### Impact\nAffected versions of this crate violated alignment when casting byte slices to integer slices, resulting in undefined behavior. `rand_core::BlockRng::next_u64` and `rand_core::BlockRng::fill_bytes` are affected.\n\n### Patches\nThe flaw was corrected by Ralf Jung and Diggory Hardy for `rand_core \u003e= 0.4.2`.\n\n### Workarounds\nNone.\n\n### References\nSee [Rand's changelog](https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06).\n\n### For more information\nIf you have any questions or comments about this advisory, [open an issue in the Rand repository](https://github.com/rust-random/rand/issues/new/choose).\n\n","status":"published","published":"2021-08-25T20:56:50Z","modified":"2023-11-08T04:03:10.161773Z","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-704"],"updated_at":"2026-11-02T15:46:52.170928Z"},{"id":"RUSTSEC-2019-0035","title":"Unaligned memory access","description":"Affected versions of this crate violated alignment when casting byte slices to\ninteger slices, resulting in undefined behavior.\n\nThe flaw was corrected by Ralf Jung and Diggory Hardy.","status":"published","published":"2019-04-19T12:00:00Z","modified":"2023-11-08T04:03:10.161773Z","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-2020-25576","description":"An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.","status":"published","published":"2020-09-14T19:15:00Z","modified":"2025-10-24T04:48:42Z","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:23.905183Z"}]}}
