Skip to content

← Actionable
High, CVSS 7.5amended

openssl-src's infinite loop in BN_mod_sqrt() reachable when parsing certificates

CVE-2022-0778GHSA-x3mh-jvjw-3xwx

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (node 17.7.2, 16.14.2, 14.19.1, 12.22.11; openssl-src 300.0.5, 111.18.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • runtime node

    Affected
    >= 12.0.0, < 12.22.11>= 14.0.0, < 14.19.1>= 16.0.0, < 16.14.2>= 17.0.0, < 17.7.2
    Fixed in
    16.14.2, 17.7.2, 14.19.1, 12.22.11
  • crates.io openssl-src

    Affected
    >= 300.0.0, < 300.0.5< 111.18.0
    Fixed in
    111.18.0, 300.0.5

Sources

  • raw.githubusercontent.com runtime security intelligence

    Node.js security working group core entry 93 lists CVE-2022-0778 affecting node >=12.0.0 =14.0.0 =16.0.0 =17.0.0 <17.7.2

    VerifiedObserved Structured Node.js security-wg core vulnerability record maintained by the Node.js project.

  • nodejs.org runtime security intelligence

    The nodejs.org release index dates the first patched release for CVE-2022-0778 to 2022-03-17.

    VerifiedObserved Official nodejs.org release index (dist/index.json).

  • GitHub Advisory Database and maintainer security advisories on GitHub

    GitHub-reviewed advisory GHSA-x3mh-jvjw-3xwx lists affected ranges: crates.io openssl-src >=300.0.0 =0 <111.18.0

    VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
  • CVE-2022-0778: 73.19% estimated exploitation activity in the next 30 days; percentile 99.46 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

The BNmodsqrt() function, which computes a modular square root, contains a bug that can cause it to loop forever for non-prime moduli. Internally this function is used when parsing certificates that contain elliptic curve public keys in compressed form or explicit elliptic curve parameters with a base point encoded in compressed form. It is possible to trigger the infinite loop by crafting a certificate that has invalid explicit curve parameters. Since certificate parsing happens prior to verification of the certificate signature, any process that parses an externally supplied certificate may thus be subject to a denial of service attack. The infinite loop can also be reached when parsing crafted private keys as they can contain explicit elliptic curve parameters. Thus vulnerable situations include: - TLS clients consuming server certificates - TLS servers consuming client certificates - Hosting providers taking certificates or private keys from customers - Certificate authorities…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from vendor_advisory record nodejs-security-wg:core:93

  2. Revision 2 · published ·

    Published from ghsa record GHSA-x3mh-jvjw-3xwx

  3. Revision 1 · created ·

    Created from vendor_advisory record nodejs-security-wg:core:93

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2022-0778

Advisory: openssl-src's infinite loop in `BN_mod_sqrt()` reachable when parsing certificates
IDs: CVE-2022-0778, GHSA-x3mh-jvjw-3xwx
Record: https://patchnext.com/advisories/cve-2022-0778 (revision 3, source checked 26 Oct 2026, 16:35 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: node 17.7.2, 16.14.2, 14.19.1, 12.22.11; openssl-src 300.0.5, 111.18.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- runtime node: affected >= 12.0.0, < 12.22.11; >= 14.0.0, < 14.19.1; >= 16.0.0, < 16.14.2; >= 17.0.0, < 17.7.2; fixed in 16.14.2, 17.7.2, 14.19.1, 12.22.11
- crates.io openssl-src: affected >= 300.0.0, < 300.0.5; < 111.18.0; fixed in 111.18.0, 300.0.5

## Suggested inspection (read-only)
- runtime node: check the installed version with your package manager.
- crates.io openssl-src: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on node, openssl-src.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://raw.githubusercontent.com/nodejs/security-wg/main/vuln/core/93.json (Node.js security working group core entry 93 lists CVE-2022-0778 affecting node >=12.0.0 =14.0.0 =16.0.0 =17.0.0 <17.7.2)
- Verified: https://nodejs.org/dist/index.json (The nodejs.org release index dates the first patched release for CVE-2022-0778 to 2022-03-17.)
- Verified: https://github.com/advisories/GHSA-x3mh-jvjw-3xwx (GitHub-reviewed advisory GHSA-x3mh-jvjw-3xwx lists affected ranges: crates.io openssl-src >=300.0.0 =0 <111.18.0)

Commands are suggestions: review each one before running it.

Loading voting…