Vulnerability · Published Dec 5, 2022 · Assigned by hackerone
CVE-2022-35255
Critical 9.1
In plain English
A critical-severity security flaw in Node from NodeJS. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | nodejs | 1:16.17.1-1.module_el8.6.0+3328+2e4711d7 | ALSA-2022:6964 |
| AlmaLinux:8 | nodejs | 1:18.9.1-1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:9 | nodejs | 1:16.17.1-1.el9_0 | ALSA-2022:6963 |
| AlmaLinux:8 | nodejs-devel | 1:18.9.1-1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | nodejs-devel | 1:16.17.1-1.module_el8.6.0+3328+2e4711d7 | ALSA-2022:6964 |
| AlmaLinux:8 | nodejs-docs | 1:16.17.1-1.module_el8.6.0+3328+2e4711d7 | ALSA-2022:6964 |
| AlmaLinux:8 | nodejs-docs | 1:18.9.1-1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:9 | nodejs-docs | 1:16.17.1-1.el9_0 | ALSA-2022:6963 |
| AlmaLinux:8 | nodejs-full-i18n | 1:18.9.1-1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | nodejs-full-i18n | 1:16.17.1-1.module_el8.6.0+3328+2e4711d7 | ALSA-2022:6964 |
| AlmaLinux:9 | nodejs-full-i18n | 1:16.17.1-1.el9_0 | ALSA-2022:6963 |
| AlmaLinux:9 | nodejs-libs | 1:16.17.1-1.el9_0 | ALSA-2022:6963 |
| AlmaLinux:8 | nodejs-nodemon | 2.0.19-2.module_el8.6.0+3261+490666b3 | ALSA-2022:6964 |
| AlmaLinux:8 | nodejs-nodemon | 2.0.19-1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | nodejs-packaging | 25-1.module_el8.5.0+2605+45d748af | ALSA-2022:6964 |
| AlmaLinux:8 | nodejs-packaging | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | nodejs-packaging-bundler | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | npm | 1:8.19.1-1.18.9.1.1.module_el8.7.0+3343+ea2b7901 | ALSA-2022:7821 |
| AlmaLinux:8 | npm | 1:8.15.0-1.16.17.1.1.module_el8.6.0+3328+2e4711d7 | ALSA-2022:6964 |
| AlmaLinux:9 | npm | 1:8.15.0-1.16.17.1.1.el9_0 | ALSA-2022:6963 |
| Alpine:v3.20 | nodejs | 16.17.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.21 | nodejs | 16.17.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.22 | nodejs | 16.17.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.23 | nodejs | 16.17.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.24 | nodejs | 16.17.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.20 | nodejs-current | 18.9.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.21 | nodejs-current | 18.9.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.22 | nodejs-current | 18.9.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.23 | nodejs-current | 18.9.1-r0 | ALPINE-CVE-2022-35255 |
| Alpine:v3.24 | nodejs-current | 18.9.1-r0 | ALPINE-CVE-2022-35255 |
| Debian:12 | nodejs | 18.10.0+dfsg-1 | DEBIAN-CVE-2022-35255 |
| Debian:13 | nodejs | 18.10.0+dfsg-1 | DEBIAN-CVE-2022-35255 |
| Debian:14 | nodejs | 18.10.0+dfsg-1 | DEBIAN-CVE-2022-35255 |
| Rocky Linux:8 | nodejs | 1:16.17.1-1.module+el8.6.0+1046+80feca58 | RLSA-2022:6964 |
| Rocky Linux:8 | nodejs | 1:18.9.1-1.module+el8.7.0+1072+5b168780 | RLSA-2022:7821 |
| Rocky Linux:9 | nodejs | 1:16.17.1-1.el9_0 | RLSA-2022:6963 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.19-2.module+el8.6.0+1046+80feca58 | RLSA-2022:6964 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.19-2.module+el8.6.0+1003+ae94235a | RLSA-2022:6964 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.19-1.module+el8.7.0+1072+5b168780 | RLSA-2022:7821 |
| Rocky Linux:8 | nodejs-packaging | 0:25-1.module+el8.6.0+1046+80feca58 | RLSA-2022:6964 |
| Rocky Linux:8 | nodejs-packaging | 0:25-1.module+el8.5.0+702+221f14e6 | RLSA-2022:6964 |
| Rocky Linux:8 | nodejs-packaging | 0:2021.06-4.module+el8.7.0+1072+5b168780 | RLSA-2022:7821 |
Affected products (as reported)
Weakness: CWE-338 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N