CVE-2022-35255

nodejs: weak randomness in WebCrypto keygen

Published Dec 5, 2022 CVSS 3.1 · 9.1 Critical EPSS 2.1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-5326-1 nodejs security update
EUVD EUVD EUVD-2022-38146 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.
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
hackerone
Published
Updated
Apr 30, 2025, 5:48 AM
Reserved
Jul 6, 2022, 12:00 AM
Status
Modified
Published
Dec 5, 2022, 10:15 PM
Modified
Jun 17, 2026, 4:51 AM
Severity
Important
Public date
Sep 23, 2022, 12:00 AM