CVE-2020-25576Rust-random Rand
Critical 9.8 No auth needed
Follow: this CVE · Rust-random · Rust-random Rand We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 1.6% probability of exploitation in 30 days · percentile 76
- Auth required
- No
- Published
- Sep 14, 2020
- Updated
- Aug 19, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-704
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Rand.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| crates.io | rand_core |
≥ 0.4.0 < 0.4.2 |
0.4.2 |
cargo update -p rand_core --precise 0.4.2 |
| crates.io | rand_core |
< 0.3.1 |
0.3.1 |
cargo update -p rand_core --precise 0.3.1 |
| crates.io | rand_core |
≥ 0.0.0-0 < 0.3.1 |
0.3.1 |
cargo update -p rand_core --precise 0.3.1 |
| crates.io | rand_core |
≥ 0.4.0-0 < 0.4.2 |
0.4.2 |
cargo update -p rand_core --precise 0.4.2 |
Per OSV / GitHub Advisories (GHSA-mmc9-pwm7-qj5w, RUSTSEC-2019-0035). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rust-random | rand | < 0.4.2 |
Official sources
References
Links published by the sources. Open them with care.
- rustsec.org Vendor Advisory