Critical
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-25576
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 05:40 UTC · Revision 1
Source evidence
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.
osv:CVE-2020-25576
Complete source record
{
"id": "b8ce39dd61c2003fd76ad3d0b824b37970f3befa8992eef5b0766cb4fb1331f2",
"url": "https://osv.dev/vulnerability/CVE-2020-25576",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-25576",
"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.",
"evidence": "osv:CVE-2020-25576",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2020-25576",
"aliases": [
"CVE-2020-25576",
"GHSA-mmc9-pwm7-qj5w",
"RUSTSEC-2019-0035"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/rust-random/rand",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "da917e673f49116f2f1bf37ea1ee5a99fe3c8c5d"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:rust-random:rand:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.4.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"rand_core-0.1.0",
"rand_pcg-0.3.1",
"rand_hc-0.3.1",
"rand_distr-0.4.1",
"rand_core-0.6.3",
"0.8.4",
"rand_chacha-0.3.1",
"rand_core-0.6.2",
"0.8.3",
"0.8.2",
"rand_core-0.6.1",
"0.8.1",
"rand_distr-0.4.0",
"0.8.0",
"rand_pcg-0.3.0",
"rand_hc-0.3.0",
"rand_core-0.6.0",
"rand_chacha-0.3.0",
"rand_chacha-0.2.2",
"0.7.3",
"rand_pcg-0.2.1",
"0.7.2",
"0.7.1",
"rand_distr-0.2.2",
"rand_xoshiro-0.4.0",
"rand_os-0.2.2",
"rand_core-0.5.1",
"rand_xoshiro-0.3.1",
"rand_os-0.2.1",
"rand_jitter-0.1.0",
"rand_core-0.4.0",
"rand_chacha-0.2.1",
"rand_distr-0.2.1",
"0.7.0",
"rand_xoshiro-0.3.0",
"rand_xorshift-0.2.0",
"rand_pcg-0.2.0",
"rand_isaac-0.2.0",
"rand_hc-0.2.0",
"rand_distr-0.2.0",
"0.7.0-pre.1",
"rand_xoshiro-0.2.1",
"rand_xorshift-0.1.2",
"rand_os-0.2.0",
"rand_jitter-0.2.0",
"rand_isaac-0.1.2",
"rand_hc-0.1.1",
"rand_core-0.5.0",
"rand_chacha-0.2.0",
"rand_os-0.1.3",
"rand_pcg-0.1.2",
"rand_jitter-0.1.3",
"rand_jitter-0.1.2",
"rand_jitter-0.1.1",
"rand_os-0.1.2",
"0.6.5",
"rand_os-0.1.1",
"0.6.4",
"0.6.3",
"rand_xoshiro-0.1.0",
"0.6.2",
"rand_xorshift-0.1.1",
"rand_os-0.1.0",
"rand_chacha-0.1.1",
"rand_isaac-0.1.1",
"0.6.1",
"0.6.0",
"0.6.0-pre.1",
"rand_hc-0.1.0",
"rand_isaac-0.1.0",
"rand_hc128-0.1.0",
"rand_chacha-0.1.0",
"0.6.0-pre.0",
"rand_core-0.2.0",
"0.5.0",
"rand_core-0.2.0-pre.0",
"0.5.0-pre.2",
"0.5.0-pre.1",
"0.5.0-pre.0",
"rand_core-0.1.0-pre.0",
"0.4.1",
"0.4.0-pre.0",
"0.3.18",
"0.3.17",
"0.1.1",
"rand_derive-0.3.1",
"rand_derive-0.3.0",
"0.3.16",
"0.3.15",
"0.3.14",
"0.3.13",
"rand_macros-0.1.10",
"0.3.12",
"rand_macros-0.1.9",
"0.3.11",
"0.3.10",
"0.3.9",
"rand_macros-0.1.7",
"0.3.8",
"rand_macros-0.1.6",
"0.3.7",
"0.3.6",
"0.3.5",
"0.3.4",
"rand_macros-0.1.5",
"0.3.3",
"0.3.2",
"0.3.1",
"0.3.0",
"0.2.1",
"0.2.0",
"0.1.4",
"0.1.3",
"rand_macros-0.1.4",
"rand_macros-0.1.3",
"rand_macros-0.1.2",
"derive_rand-0.1.1",
"0.1.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-25576.json"
}
}
],
"modified": "2026-10-24T10:30:32.266889513Z",
"provider": "osv",
"references": [
"https://rustsec.org/advisories/RUSTSEC-2019-0035.html"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2020-25576",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 432989,
"published_at": "2020-09-14T19:15:11.473+00:00"
}