{"id":"CVE-2021-45705","aliases":["CVE-2021-45705","GHSA-p6gj-gpc8-f8xw","GHSA-r57r-j98g-587f","RUSTSEC-2021-0114"],"related":[],"kind":"vulnerability","state":"published","title":"Aliased mutable references from `tls_rand` & `TlsWyRand`","summary":"An issue was discovered in the nanorand crate before 0.6.1 for Rust. There can be multiple mutable references to the same object because the TlsWyRand Deref implementation dereferences a raw pointer.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the nanorand crate before 0.6.1 for Rust. There can be multiple mutable references to the same object because the TlsWyRand Deref implementation dereferences a raw pointer.","source":"cvelist"},{"lang":"en","text":"`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns \nmultiple mutable references to the same object, which is undefined behavior.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se ha detectado un problema en la crate nanorand versiones anteriores a 0.6.1 de Rust. Puede haber múltiples referencias mutables al mismo objeto porque la implementación de TlsWyRand Deref hace referencia a un puntero sin procesar","source":"nvd"}],"published":"2021-09-23T12:00:00.000Z","modified":"2026-06-17T04:13:59.147Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.5.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"nanorand","purl":"pkg:cargo/nanorand","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.5.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"nanorand","purl":"pkg:cargo/nanorand","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.5.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"nanorand","purl":"pkg:cargo/nanorand","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"0.5.0","fixed":"0.6.1"}],"vendor":"nanorand_project","product":"nanorand","cpe":"cpe:2.3:a:nanorand_project:nanorand:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0114.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/nanorand/RUSTSEC-2021-0114.md","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Absolucy/nanorand-rs/issues/28","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/Absolucy/nanorand-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45705","tags":["advisory"],"sources":["ghsa"]},{"url":"https://crates.io/crates/nanorand","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45705","url":"https://www.cve.org/CVERecord?id=CVE-2021-45705","licence":"CVE Terms of Use","modified":"2024-08-04T04:47:02.351Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p6gj-gpc8-f8xw","url":"https://github.com/advisories/GHSA-p6gj-gpc8-f8xw","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:22.929Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r57r-j98g-587f","url":"https://github.com/advisories/GHSA-r57r-j98g-587f","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:22.929Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0114","url":"https://rustsec.org/advisories/RUSTSEC-2021-0114.html","licence":"CC0-1.0","modified":"2023-11-08T04:07:22.929Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45705","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45705","licence":"Public domain","modified":"2026-06-17T04:13:59.147Z"}],"updatedAt":"2026-11-25T22:58:06.270Z","epss":{"score":0.0123,"percentile":0.69812,"date":"2026-12-02T12:00:21.000Z"}}