CVE-2021-27378Rand Core Project Rand Core
Critical 9.8 No auth needed
Follow: this CVE · Rand Core Project · Rand Core Project Rand Core We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 1.3% probability of exploitation in 30 days · percentile 69
- Auth required
- No
- Published
- Feb 18, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-131
- 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.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.
What to do
- Apply the vendor's security update for Rand Core.
- 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.6.0 < 0.6.2 |
0.6.2 |
cargo update -p rand_core --precise 0.6.2 |
| crates.io | rand_core |
≥ 0.6.0 < 0.6.2 |
0.6.2 |
cargo update -p rand_core --precise 0.6.2 |
Per OSV / GitHub Advisories (GHSA-w7j2-35mf-95p7, RUSTSEC-2021-0023). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rand_core_project | rand_core | ≥ 0.6.0 < 0.6.2 |
Official sources
References
Links published by the sources. Open them with care.
- rustsec.org Third Party Advisory