{"cve":"CVE-2022-0778","nvd":{"published":"2022-03-15T17:15:08.513","modified":"2026-10-14T13:17:14.377","status":"Modified","description":"The BN_mod_sqrt() 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 parsing certification requests from subscribers - Anything else which parses ASN.1 elliptic curve parameters Also any other applications that use the BN_mod_sqrt() where the attacker can control the parameter values are vulnerable to this DoS issue. In the OpenSSL 1.0.2 version the public key is not parsed during initial parsing of the certificate which makes it slightly harder to trigger the infinite loop. However any operation which requires the public key from the certificate will trigger the infinite loop. In particular the attacker can use a self-signed certificate to trigger the loop during verification of the certificate signature. This issue affects OpenSSL versions 1.0.2, 1.1.1 and 3.0. It was addressed in the releases of 1.1.1n and 3.0.2 on the 15th March 2022. Fixed in OpenSSL 3.0.2 (Affected 3.0.0,3.0.1). Fixed in OpenSSL 1.1.1n (Affected 1.1.1-1.1.1m). Fixed in OpenSSL 1.0.2zd (Affected 1.0.2-1.0.2zc).","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-835"],"references":["http://packetstormsecurity.com/files/167344/OpenSSL-1.0.2-1.1.1-3.0-BN_mod_sqrt-Infinite-Loop.html","http://seclists.org/fulldisclosure/2022/May/33","http://seclists.org/fulldisclosure/2022/May/35","http://seclists.org/fulldisclosure/2022/May/38","https://cert-portal.siemens.com/productcert/pdf/ssa-712929.pdf"],"products":["debian:debian_linux","fedoraproject:fedora","mariadb:mariadb","netapp:500f_firmware","netapp:a250_firmware","netapp:cloud_volumes_ontap_mediator","netapp:clustered_data_ontap","netapp:clustered_data_ontap_antivirus_connector","netapp:santricity_smi-s_provider","netapp:storagegrid","nodejs:node.js","openssl:openssl","tenable:nessus"],"source":"nvd","synced_at":"2026-10-19T21:29:06.454770966+00:00"},"epss":{"cve":"CVE-2022-0778","score":0.73188,"percentile":0.99453,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-x3mh-jvjw-3xwx","url":"https://osv.dev/vulnerability/GHSA-x3mh-jvjw-3xwx","summary":"openssl-src's infinite loop in `BN_mod_sqrt()` reachable when parsing certificates","modified":"2026-09-10T03:49:28.441064213Z","packages":[{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":[">=300.0.0 <300.0.5"],"fixed":["300.0.5"]},{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":["<111.18.0"],"fixed":["111.18.0"]}]},{"id":"RUSTSEC-2022-0014","url":"https://osv.dev/vulnerability/RUSTSEC-2022-0014","summary":"Infinite loop in `BN_mod_sqrt()` reachable when parsing certificates","modified":"2025-06-10T12:59:30.551888Z","packages":[{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":[">=0.0.0-0 <111.18.0",">=300.0.0 <300.0.5"],"fixed":["111.18.0","300.0.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}