Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io
Not in CISA KEV

CVE-2021-45705 — nanorand

CVE-2021-45705 is a security vulnerability in nanorand. A fix is available for nanorand — see the affected versions and patch details below.

Aliased mutable references from `tls_rand` & `TlsWyRand`

Also known asGHSA-r57r-j98g-587fRUSTSEC-2021-0114
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs67th percentile — riskier than 67% of all scored CVEsHighest risk
0.00%0.56%1.13%1.69%0.4%1.2%1.2%1.2%Jun 26Sep 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🦀nanorand

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.ionanorand≥ 0.5.0&&< 0.6.10.6.1cargo update -p nanorand --precise 0.6.1

Affected Products

1 product · 1 configurations
Application
nanorandnanorand_project
≥ 0.5.0 && < 0.6.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nanorand, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update nanorand to 0.6.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-45705 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns multiple mutable references to the same object, which is undefined behavior.
O3 Security · Impact-Aware SCA

Is CVE-2021-45705 in your dependencies?

Find it across crates.io, including transitive dependencies.

CVE-2021-45705: nanorand — Fixed in 0.6.1