CVE-2020-35926 Improper random number generation in nanorand

Critical 9.8 Published Updated

The nanorand crate returns all zeroes due to integer truncation, compromising randomness for security-sensitive operations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-35926?

CVE-2020-35926 is a critical vulnerability in n/a, published on 31 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-681, CWE-330

Which versions are affected by CVE-2020-35926?

3 open source packages ship an affected version, including nanorand. It affects 1 product.

PackageAffectedFixed in
nanorand crates.ioAll versions0.5.1
nanorand crates.ioAll versions0.5.1
nanorand crates.ioFrom 0.0.0-00.5.1

Products include Nanorand Project Nanorand.

How do I fix CVE-2020-35926?

Upgrade nanorand to 0.5.1 or later.

Is CVE-2020-35926 being exploited?

There is no known exploitation of CVE-2020-35926 in the wild and no public exploit code.

Sources

Also known as GHSA-m9m5-cg5h-r582, RUSTSEC-2020-0089.

Is CVE-2020-35926 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free