# CVE-2020-25576: Unaligned memory access in rand_core

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.60%, higher than 76% of CVEs (2026-12-01)
- Published: 2019-04-19T12:00:00.000Z
- Modified: 2026-08-19T19:21:55.070Z
- Also known as: GHSA-mmc9-pwm7-qj5w, RUSTSEC-2019-0035
- Weaknesses: CWE-704
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- rand_core (crates.io): from 0.4.0 before 0.4.2; before 0.3.1; from 0.0.0-0 before 0.3.1; from 0.4.0-0 before 0.4.2
- rust-random rand: before 0.4.2

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- RustSec Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://rustsec.org/advisories/RUSTSEC-2019-0035.html> (advisory, vendor-advisory, web)
- <https://github.com/rust-random/rand/security/advisories/GHSA-mmc9-pwm7-qj5w> (web)
- <https://github.com/rust-random/rand> (package)
- <https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06> (web)
- <https://crates.io/crates/rand_core> (package)

## Sources

- CVE List: [CVE-2020-25576](https://www.cve.org/CVERecord?id=CVE-2020-25576), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-mmc9-pwm7-qj5w](https://github.com/advisories/GHSA-mmc9-pwm7-qj5w), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2019-0035](https://rustsec.org/advisories/RUSTSEC-2019-0035.html), CC0-1.0, modified 2023-11-08
- NVD: [CVE-2020-25576](https://nvd.nist.gov/vuln/detail/CVE-2020-25576), Public domain, modified 2026-08-19

---

Page: https://cve.day/CVE-2020-25576 · Whole record: https://cve.day/CVE-2020-25576.json · Rebuilt by cve.day 2026-11-25T22:57:54.696Z
