Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2022-35255

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-35255
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 16:40 UTC · Revision 1

Source evidence

CVE-2022-35255

core-osv · Original source

Published 5 Dec 2022, 00:00 UTC

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.

osv:CVE-2022-35255
Complete source record
{
  "id": "83aca428e84daaf4ee772e5b408b08addf905418eccaafe960d99ae0dc8a0280",
  "url": "https://osv.dev/vulnerability/CVE-2022-35255",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2022-35255",
    "summary": "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.",
    "evidence": "osv:CVE-2022-35255",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2022-35255",
      "aliases": [
        "BIT-node-2022-35255",
        "BIT-node-min-2022-35255",
        "CVE-2022-35255"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nodejs/node",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d683e3dda09b6b3cc6cad6fd2c106e3061a48f0d"
                },
                {
                  "last_affected": "1a34e9c24bf6dd07ff575a8c198f93cd5e8d15b9"
                },
                {
                  "introduced": "7162e686b18d22b4385fa5c04274fb04dbd810c7"
                },
                {
                  "last_affected": "49415500bb1bf51a1fade5ea2d03f3988ecabc25"
                },
                {
                  "introduced": "40ecd5601193c316e62e9216e8a4259130686208"
                },
                {
                  "fixed": "6b06e89c7dfccec6792008302af1cee57649445c"
                },
                {
                  "introduced": "49a77a5a996a49e8cb728eed42e55a7c1a9eef6e"
                },
                {
                  "fixed": "df3ed1e89299e4c8f006fc20e22265a889c97919"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "15.0.0"
                      },
                      {
                        "last_affected": "15.14.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "16.0.0"
                      },
                      {
                        "last_affected": "16.12.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:lts:*:*:*",
                    "range": [
                      {
                        "introduced": "16.13.0"
                      },
                      {
                        "fixed": "16.17.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "18.0.0"
                      },
                      {
                        "fixed": "18.9.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v18.9.0",
            "v18.8.0",
            "v16.17.0",
            "v18.7.0",
            "v18.6.0",
            "v16.16.0",
            "v18.5.0",
            "v18.4.0",
            "v18.3.0",
            "v16.15.1",
            "v18.2.0",
            "v18.1.0",
            "v16.15.0",
            "v18.0.0",
            "v16.14.2",
            "v16.14.1",
            "v16.14.0",
            "v16.13.2",
            "v16.13.1",
            "v16.13.0",
            "v16.12.0",
            "v16.11.1",
            "v16.11.0",
            "v16.10.0",
            "v16.9.1",
            "v16.9.0",
            "v16.8.0",
            "v16.7.0",
            "v16.6.2",
            "v16.6.1",
            "v16.6.0",
            "v16.5.0",
            "v16.4.2",
            "v16.4.1",
            "v16.4.0",
            "v16.3.0",
            "v16.2.0",
            "v16.1.0",
            "v16.0.0",
            "v15.14.0",
            "v15.13.0",
            "v15.12.0",
            "v15.11.0",
            "v15.10.0",
            "v15.9.0",
            "v15.8.0",
            "v15.7.0",
            "v15.6.0",
            "v15.5.1",
            "v15.5.0",
            "v15.4.0",
            "v15.3.0",
            "v15.2.1",
            "v15.2.0",
            "v15.1.0",
            "v15.0.1",
            "v15.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35255.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:20.845583074Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/pdf/ssa-332410.pdf",
        "https://hackerone.com/reports/1690000",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35255.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-35255",
        "https://security.netapp.com/advisory/ntap-20230113-0002/",
        "https://www.debian.org/security/2023/dsa-5326"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-338"
        ],
        "cna_assigner": "hackerone",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.0"
                  },
                  {
                    "fixed": "4.*"
                  },
                  {
                    "introduced": "5.0"
                  },
                  {
                    "fixed": "5.*"
                  },
                  {
                    "introduced": "6.0"
                  },
                  {
                    "fixed": "6.*"
                  },
                  {
                    "introduced": "7.0"
                  },
                  {
                    "fixed": "7.*"
                  },
                  {
                    "introduced": "8.0"
                  },
                  {
                    "fixed": "8.*"
                  },
                  {
                    "introduced": "9.0"
                  },
                  {
                    "fixed": "9.*"
                  },
                  {
                    "introduced": "10.0"
                  },
                  {
                    "fixed": "10.*"
                  },
                  {
                    "introduced": "11.0"
                  },
                  {
                    "fixed": "11.*"
                  },
                  {
                    "introduced": "12.0"
                  },
                  {
                    "fixed": "12.*"
                  },
                  {
                    "introduced": "13.0"
                  },
                  {
                    "fixed": "13.*"
                  },
                  {
                    "introduced": "15.0"
                  },
                  {
                    "fixed": "15.*"
                  },
                  {
                    "introduced": "17.0"
                  },
                  {
                    "fixed": "17.*"
                  },
                  {
                    "introduced": "18.0"
                  },
                  {
                    "fixed": "18.9.1"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35255.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-35255",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487278,
  "published_at": "2022-12-05T00:00:00+00:00"
}