Name | CVE-2022-35255 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DSA-5326-1 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
nodejs (PTS) | jessie | 0.10.29~dfsg-2 | vulnerable |
stretch | 4.8.2~dfsg-1 | vulnerable | |
buster (security), buster, buster (lts) | 10.24.0~dfsg-1~deb10u4 | fixed | |
bullseye | 12.22.12~dfsg-1~deb11u4 | fixed | |
bullseye (security) | 12.22.12~dfsg-1~deb11u5 | fixed | |
bookworm | 18.19.0+dfsg-6~deb12u2 | fixed | |
bookworm (security) | 18.19.0+dfsg-6~deb12u1 | fixed | |
trixie | 20.18.0+dfsg-2 | fixed | |
sid | 20.18.1+dfsg-1 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
nodejs | source | jessie | (unfixed) | end-of-life | ||
nodejs | source | stretch | (unfixed) | end-of-life | ||
nodejs | source | buster | (not affected) | |||
nodejs | source | bullseye | 12.22.12~dfsg-1~deb11u3 | DSA-5326-1 | ||
nodejs | source | (unstable) | 18.10.0+dfsg-1 |
[buster] - nodejs <not-affected> (Vulnerable code introduced later)
https://nodejs.org/en/blog/vulnerability/september-2022-security-releases/#weak-randomness-in-webcrypto-keygen-high-cve-2022-35255
https://github.com/nodejs/node/commit/0c2a5723beff39d1f62daec96b5389da3d427e79 (v18.9.1)
Introduced by https://github.com/nodejs/node/commit/dae283d96fd31ad0f30840a7e55ac97294f505ac (v15.0.0)