Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Affecting nodejs:16/nodejs-nodemon package, versions <0:2.0.19-2.module_el8.6.0+3261+490666b3


Severity

Recommended
high

Based on AlmaLinux security rating.

Threat Intelligence

EPSS
0.18% (57th 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 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-ALMALINUX8-NODEJS-5659226
  • published28 May 2023
  • disclosed18 Oct 2022

Introduced: 18 Oct 2022

CVE-2022-35255  (opens in a new tab)
CWE-338  (opens in a new tab)

How to fix?

Upgrade AlmaLinux:8 nodejs:16/nodejs-nodemon to version 0:2.0.19-2.module_el8.6.0+3261+490666b3 or higher.
This issue was patched in ALSA-2022:6964.

NVD Description

Note: Versions mentioned in the description apply only to the upstream nodejs:16/nodejs-nodemon package and not the nodejs:16/nodejs-nodemon package as distributed by AlmaLinux. See How to fix? for AlmaLinux:8 relevant fixed versions and status.

A weak randomness in WebCrypto keygen vulnerability exists in Node.js 18 due to a change with EntropySource() in SecretKeyGenTraits::DoKeyGen() in src/crypto/crypto_keygen.cc. There are two problems with this: 1) It does not check the return value, it assumes EntropySource() always succeeds, but it can (and sometimes will) fail. 2) The random data returned byEntropySource() may not be cryptographically strong and therefore not suitable as keying material.

CVSS Scores

version 3.1