{"id":"CVE-2021-45705","aliases":["EUVD-2022-0681","GHSA-p6gj-gpc8-f8xw","GHSA-r57r-j98g-587f","RUSTSEC-2021-0114"],"status":"published","title":"Aliased mutable references from `tls_rand` \u0026 `TlsWyRand`","description":"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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.0123,"percentile":0.69135,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2021-09-23T12:00:00Z","modified":"2026-06-17T04:13:59Z","fixes":[{"ecosystem":"crates.io","package":"nanorand","fixed_in":["0.6.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"nanorand","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.5.0"},{"fixed":"0.6.1"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"nanorand","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.5.0"},{"fixed":"0.6.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"nanorand","ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.6.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"nanorand","ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.6.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"nanorand","ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.6.1"}]}]}],"products":[{"vendor":"nanorand_project","product":"nanorand"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0114.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/nanorand/RUSTSEC-2021-0114.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/Absolucy/nanorand-rs/issues/28","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-p6gj-gpc8-f8xw"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45705","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-r57r-j98g-587f"},{"url":"https://github.com/Absolucy/nanorand-rs","tags":["package"]},{"url":"https://crates.io/crates/nanorand","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-45705","description":"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.","status":"published","published":"2021-12-26T21:48:21Z","modified":"2024-08-04T04:47:02.351Z","updated_at":"2026-11-02T14:33:02.580561Z"}],"euvd":[{"id":"EUVD-2022-0681","description":"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.","status":"published","published":"2021-12-26T21:48:21Z","modified":"2024-08-04T04:47:02Z","updated_at":"2026-11-03T03:08:25.77408Z"}],"ghsa":[{"id":"GHSA-r57r-j98g-587f","title":"Pointer dereference in nanorand","description":"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.","status":"published","published":"2022-01-06T22:08:56Z","modified":"2023-06-13T18:38:09Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T14:36:53.654352Z"},{"id":"GHSA-p6gj-gpc8-f8xw","title":"Aliased mutable references from `tls_rand` \u0026 `TlsWyRand`","description":"`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns \nmultiple mutable references to the same object, which is undefined behavior.\n","status":"published","published":"2022-06-17T00:13:24Z","modified":"2023-06-13T18:37:41Z","updated_at":"2026-11-02T14:36:53.654352Z"}],"nvd":[{"id":"CVE-2021-45705","description":"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.","status":"published","published":"2021-12-27T00:15:09.857Z","modified":"2026-06-17T04:13:59.147Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"GHSA-r57r-j98g-587f","title":"Pointer dereference in nanorand","description":"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.","status":"published","published":"2022-01-06T22:08:56Z","modified":"2023-11-08T04:07:22.929289Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:46:55.480549Z"},{"id":"GHSA-p6gj-gpc8-f8xw","title":"Aliased mutable references from `tls_rand` \u0026 `TlsWyRand`","description":"`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns \nmultiple mutable references to the same object, which is undefined behavior.\n","status":"published","published":"2022-06-17T00:13:24Z","modified":"2023-11-08T04:07:22.929289Z","updated_at":"2026-11-02T15:46:52.891208Z"},{"id":"RUSTSEC-2021-0114","title":"Aliased mutable references from `tls_rand` \u0026 `TlsWyRand`","description":"`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns \nmultiple mutable references to the same object, which is undefined behavior.","status":"published","published":"2021-09-23T12:00:00Z","modified":"2023-11-08T04:07:22.929289Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
