Live threats

All CVEs / Rust-random

CVE-2020-25576Rust-random Rand

Critical 9.8 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rand.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
rust-randomrand< 0.4.2

Official sources

References

Links published by the sources. Open them with care.