CVE-2022-35255

published 5 Dec 2022 · updated 30 Apr 2025

A weak randomness in WebCrypto keygen vulnerability exists in Node.js 18 due to a change with EntropySource() in…

9.1CriticalCVSS 9.1EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 10.*, 11.*, 12.* and 10 more.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
nodejs>=10.0 <10.*, >=11.0 <11.*, >=12.0 <12.*, >=13.0 <13.*, >=15.0 <15.*, >=17.0 <17.*, >=18.0 <18.9.1, >=4.0 <4.*, >=5.0 <5.*, >=6.0 <6.*, >=7.0 <7.*, >=8.0 <8.*, >=9.0 <9.*10.*, 11.*, 12.*, 13.*, 15.*, 17.*, 18.9.1, 4.*, 5.*, 6.*, 7.*, 8.*, 9.*

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-35255 severity on Zeptric[![CVE-2022-35255](https://zeptric.io/badge/cve/CVE-2022-35255.svg)](https://zeptric.io/cve/CVE-2022-35255)