CVE-2020-25576 json
Unaligned memory access in rand_core
published 7y ago modified 2mo ago also GHSA-mmc9-pwm7-qj5w , RUSTSEC-2019-0035 , EUVD-2021-1804
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io rand_core 0.3.1, 0.4.2
- rust-random rand 0.4.2
- rust-rand-core Debian 14, Debian 13, Debian 12 0.5.0-1
debian advisories DEBIAN-CVE-2020-25576
- kata-containers Azure Linux 3.0 3.2.0.azl2-3
azure linux advisories AZL-46540
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Is CVE-2020-25576 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.60% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | rand_core | >=0.4.0, <0.4.2 <0.3.1 >=0.0.0-0, <0.3.1 >=0.4.0-0, <0.4.2 |
0.4.2 0.3.1 |
Classification
- Weakness
-
- CWE-704 Incorrect Type Conversion or Cast
References
-
rustsec.org
/advisories/RUSTSEC-2019-0035.html
web, vendor-advisory, advisory
-
github.com
/rust-random/rand/security/advisories/GHSA-mmc9-pwm7-qj5w
web
-
github.com
/rust-random/rand
package
-
github.com
/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06
web
-
crates.io
/crates/rand_core
package
Sources
- CVE List CVE-2020-25576
- GitHub Advisory GHSA-mmc9-pwm7-qj5w
- NVD CVE-2020-25576
- OSV RUSTSEC-2019-0035
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.