CVE-2020-35926 json
Improper random number generation in nanorand
published 5y ago modified 4mo ago also GHSA-m9m5-cg5h-r582 , RUSTSEC-2020-0089 , EUVD-2021-1796
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
An issue was discovered in the nanorand crate before 0.5.1 for Rust. It caused any random number generator (even ChaCha) to return all zeroes because integer truncation was mishandled.
Patch / fix
- crates.io nanorand 0.5.1
- nanorand_project nanorand 0.5.1
Is CVE-2020-35926 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.53% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 5.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | 3.1 | 5.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | nanorand | <0.5.1 >=0.0.0-0, <0.5.1 |
0.5.1 |
Classification
References
-
github.com
/Absolucy/nanorand-rs/commit/5ba218ac29df4786b002d7d12b47fa0c04a331f2
web
-
rustsec.org
/advisories/RUSTSEC-2020-0089.html
web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-35926
advisory
-
github.com
/Absolucy/nanorand-rs
package
-
twitter.com
/aspenluxxxy/status/1336684692284772352
web
-
crates.io
/crates/nanorand
package
Sources
- CVE List CVE-2020-35926
- GitHub Advisory GHSA-m9m5-cg5h-r582
- NVD CVE-2020-35926
- OSV RUSTSEC-2020-0089
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.