CVE-2022-0778: Infinite loop in BN_mod_sqrt() reachable when parsing certificates
CVE-2022-0778 is not on CISA's Known Exploited Vulnerabilities list as of 4 December 2026, but EPSS estimates a 73.2% chance of exploitation attempts in the next 30 days, higher than 99.5% of all scored vulnerabilities.
- Exploited in real attacks
- Not confirmed by CISA as of 4 December 2026
- Public exploit code
- None found in Exploit-DB, Metasploit or Nuclei
- Chance of exploitation (EPSS)
- 73.2% in the next 30 days, higher than 99.5% of scored vulnerabilities. Scored 5 December 2026
- Severity (CVSS)
- 7.5 High (version 3.1)
- Affects
- OpenSSL OpenSSL
- Type of flaw
- Loop with Unreachable Exit Condition ('Infinite Loop') (CWE-835)
- Published
- 15 March 2022
What it is
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).
Description from the CVE record.
Is CVE-2022-0778 being exploited?
CVE-2022-0778 is not in CISA's catalog, which currently lists 1,814 vulnerabilities. That does not mean it is safe. The catalog only includes cases CISA has confirmed, and the EPSS model, which predicts exploitation from observed attack traffic and other signals, rates this one at 73.2%. Fewer than 1 in 100 scored vulnerabilities rate higher.
Affected products
- OpenSSL: 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)
From the CVE record. Check the vendor advisory for the full list of fixed versions.
What to do
Apply the vendor's fix or mitigation, using the advisories in the sources below. Until it is patched, limit who can reach the affected system, especially from the internet.
How to check whether you are exposed
- Find every copy. List each place OpenSSL runs, including test systems and anything set up outside IT.
- Compare versions. Match what you find against the affected versions in the vendor advisory.
- Check reachability. An affected system that faces the internet is urgent; one reachable only from inside still matters once an attacker has a foothold.
HackDrill
Find out whether this is reachable in your systems.
A version number tells you a system is affected. A hacking drill tells you whether an attacker can actually get in through a flaw like this one in OpenSSL. HackDrill's AI agents attack your product, infrastructure, network and cloud the way modern attackers do, and show you the real, exploitable gaps so you can fix them first.
Other tracked vulnerabilities in OpenSSL products
| CVE | What it affects | Status | EPSS | Published |
|---|---|---|---|---|
| CVE-2014-0160 | OpenSSL | Public exploit | 99.9% | 7 April 2014 |
| CVE-2022-2068 | OpenSSL | No public exploit found | 96.4% | 21 June 2022 |
| CVE-2022-3786 | OpenSSL | No public exploit found | 92.5% | 1 November 2022 |
| CVE-2022-3602 | OpenSSL | No public exploit found | 90.8% | 1 November 2022 |
| CVE-2021-3711 | OpenSSL | No public exploit found | 88.6% | 24 August 2021 |
| CVE-2022-1292 | OpenSSL | No public exploit found | 83.1% | 3 May 2022 |
Sources
- CVE record for CVE-2022-0778
- NVD entry
- FIRST EPSS, scores dated 5 December 2026
- www.openssl.org
- git.openssl.org
- git.openssl.org
- git.openssl.org
- www.debian.org (vendor-advisory)
- lists.debian.org (mailing-list)
- lists.debian.org (mailing-list)
- lists.fedoraproject.org (vendor-advisory)
Machine-readable: /api/cve/CVE-2022-0778.json