Cryptographic Weakness Affecting nanorand package, versions <0.5.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (60th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cryptographic Weakness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-NANORAND-1296843
  • published26 May 2021
  • disclosed9 Dec 2020
  • creditUnknown

Introduced: 9 Dec 2020

CVE-2020-35926  (opens in a new tab)
CWE-338  (opens in a new tab)

How to fix?

Upgrade nanorand to version 0.5.1 or higher.

Overview

nanorand is an A tiny, fast, zero-dep library for random number generation.

Affected versions of this package are vulnerable to Cryptographic Weakness. RandomGen implementations for standard unsigned integers could fail to properly generate numbers, due to using bit-shifting to truncate a 64-bit number, rather than just an as conversion. This often manifested as RNGs returning nothing but 0, including the cryptographically secure ChaCha random number generator.

References

CVSS Scores

version 3.1