← Vulnerability feed

Vulnerability record · CVE-2022-0778 · published 15 March 2022

CVE-2022-0778: OpenSSL BN_mod_sqrt infinite loop denial of service

OOpenssl · Openssl

The BN_mod_sqrt() function in OpenSSL loops forever when computing a modular square root for non-prime moduli. This function is reached while parsing certificates or private keys that carry elliptic curve public keys or explicit curve parameters in compressed form, and parsing happens before signature verification. Any process that parses externally supplied certificates or keys can therefore be hung, making this a remotely reachable denial of service.

7.5 CVSS 3.1 High EPSS 73% · top 0.6% CWE-835 · CWE-835
7.5CVSS 3.1 base score, v2 5.0
73%EPSS exploitation probability, 30 days
NoNot in CISA KEV
13Affected product versions listed by NVD
63References
17 Jun 2026Last modified by NVD

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:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

high priorityRemote, unauthenticated denial of service with a 7.5 CVSS score and very high EPSS, though it causes availability loss only and is not in KEV.

What it is

The BN_mod_sqrt() function in OpenSSL loops forever when computing a modular square root for non-prime moduli. This function is reached while parsing certificates or private keys that carry elliptic curve public keys or explicit curve parameters in compressed form, and parsing happens before signature verification. Any process that parses externally supplied certificates or keys can therefore be hung, making this a remotely reachable denial of service.

Impact

An attacker can stall or exhaust a worker process or thread indefinitely, denying service to legitimate TLS clients or servers and other certificate-consuming services. No data is read or modified; the effect is availability loss only.

Attack surface

Reached over the network by supplying a crafted certificate, certificate request or private key containing invalid explicit elliptic curve parameters; no authentication or user interaction is required per the CVSS vector AV:N/AC:L/PR:N/UI:N. Any component that parses ASN.1 elliptic curve parameters, including TLS clients and servers, CAs and hosting providers, is exposed.

Exploitation

Not listed in CISA KEV and no ransomware association is recorded, but EPSS is very high at 0.732 (99.4th percentile), and public proof-of-concept material is referenced via Packet Storm and Full Disclosure. Treat as easily weaponizable for denial of service.

What to do

  • Upgrade OpenSSL to 3.0.2, 1.1.1n or 1.0.2zd, or later, and rebuild or restart dependent services.
  • Update downstream packages that bundle OpenSSL (Debian, Fedora, Node.js, MariaDB, NetApp, Apple and others) using vendor advisories.
  • Where immediate patching is not possible, restrict or rate-limit untrusted certificate and key parsing, and cap per-connection processing time.
  • Reject certificates and keys with explicit elliptic curve parameters or compressed points at the application or proxy layer if your use case does not require them.
  • Monitor and restart hung TLS or certificate-processing workers as a stopgap.

Detection

  • Alert on TLS or certificate-parsing worker processes or threads stuck at high CPU for abnormal durations.
  • Monitor connection handling timeouts and thread pool exhaustion on TLS endpoints and certificate authorities.
  • Log and review submissions of certificates, CSRs or keys containing explicit EC parameters or compressed points.
  • Track OpenSSL version inventory to find hosts still running 1.0.2, 1.1.1 before n, or 3.0.0/3.0.1.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

13 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://packetstormsecurity.com/files/167344/OpenSSL-1.0.2-1.1.1-3.0-BN_mod_sqrt-Infinite-Loop.html Third Party AdvisoryVDB Entry
http://seclists.org/fulldisclosure/2022/May/33 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2022/May/35 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2022/May/38 Mailing ListThird Party Advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-712929.pdf Third Party Advisory
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=3118eb64934499d93db3230748a452351d1d9a65
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=380085481c64de749a6dd25cdf0bcf4360b30f83
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=a466912611aa6cbdf550cd10601390e587451246
https://lists.debian.org/debian-lts-announce/2022/03/msg00023.html Mailing ListThird Party Advisory
https://lists.debian.org/debian-lts-announce/2022/03/msg00024.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/323SNN6ZX7PRJJWP2BUAFLP
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GDB3GQVJPXJE7X5C5JN6JAA
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W6K3PR542DXWLEFFMFIDMME
https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0002 Third Party Advisory
https://security.gentoo.org/glsa/202210-02 Third Party Advisory
https://security.netapp.com/advisory/ntap-20220321-0002/ Third Party Advisory
https://security.netapp.com/advisory/ntap-20220429-0005/ Third Party Advisory
https://security.netapp.com/advisory/ntap-20240621-0006/
https://support.apple.com/kb/HT213255 Third Party Advisory
https://support.apple.com/kb/HT213256 Third Party Advisory
https://support.apple.com/kb/HT213257 Third Party Advisory
https://www.debian.org/security/2022/dsa-5103 Third Party Advisory
https://www.openssl.org/news/secadv/20220315.txt Vendor Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Third Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html Third Party Advisory
https://www.tenable.com/security/tns-2022-06 Third Party Advisory
https://www.tenable.com/security/tns-2022-07 Third Party Advisory
https://www.tenable.com/security/tns-2022-08 Third Party Advisory
https://www.tenable.com/security/tns-2022-09 Third Party Advisory
http://packetstormsecurity.com/files/167344/OpenSSL-1.0.2-1.1.1-3.0-BN_mod_sqrt-Infinite-Loop.html Third Party AdvisoryVDB Entry
http://seclists.org/fulldisclosure/2022/May/33 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2022/May/35 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2022/May/38 Mailing ListThird Party Advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-712929.pdf Third Party Advisory
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=3118eb64934499d93db3230748a452351d1d9a65
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=380085481c64de749a6dd25cdf0bcf4360b30f83
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=a466912611aa6cbdf550cd10601390e587451246
https://lists.debian.org/debian-lts-announce/2022/03/msg00023.html Mailing ListThird Party Advisory
https://lists.debian.org/debian-lts-announce/2022/03/msg00024.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/323SNN6ZX7PRJJWP2BUAFLP

Track CVE-2022-0778 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2022-0778), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.