Every CVE Search/ Get API key

CVE-2021-45705

Aliased mutable references from `tls_rand` & `TlsWyRand`

9.8 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.23%Up 0.6 points since Dec 27, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

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.

Record
CVE-2021-45705
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2021-45705
Updated
2026-11-02
EUVDEUVD-2022-0681 No score

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.

Record
EUVD-2022-0681
Updated
2026-11-03
GitHub AdvisoriesGHSA-r57r-j98g-587f 9.8

Pointer dereference in nanorand

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.

Record
GHSA-r57r-j98g-587f
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-p6gj-gpc8-f8xw No score

Aliased mutable references from `tls_rand` & `TlsWyRand`

TlsWyRand's implementation of Deref unconditionally dereferences a raw pointer, and returns multiple mutable references to the same object, which is undefined behavior.

Record
GHSA-p6gj-gpc8-f8xw
Updated
2026-11-02
OSVGHSA-r57r-j98g-587f 9.8

Pointer dereference in nanorand

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.

Record
GHSA-r57r-j98g-587f
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-p6gj-gpc8-f8xw No score

Aliased mutable references from `tls_rand` & `TlsWyRand`

TlsWyRand's implementation of Deref unconditionally dereferences a raw pointer, and returns multiple mutable references to the same object, which is undefined behavior.

Record
GHSA-p6gj-gpc8-f8xw
Updated
2026-11-02
OSVRUSTSEC-2021-0114 No score

Aliased mutable references from `tls_rand` & `TlsWyRand`

TlsWyRand's implementation of Deref unconditionally dereferences a raw pointer, and returns multiple mutable references to the same object, which is undefined behavior.

Record
RUSTSEC-2021-0114
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
nanorand
crates.io
0.5.0 up to 0.6.1
0.6.1

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-45705 is a critical vulnerability (CVSS 9.8) in Nanorand Project Nanorand, published September 23, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.23%, the 69th percentile. Fixed in nanorand 0.6.1.

References

MoveEnter Open