CVE-2022-0778: Infinite loop in BN_mod_sqrt() reachable when parsing certificates
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).
Security readout for executives and security teams
Plain-English summary
A specially crafted certificate or private key can make vulnerable OpenSSL versions loop indefinitely while parsing elliptic-curve data. The business impact is denial of service: affected services may hang or consume CPU before certificate trust is even checked. The sources do not indicate confidentiality or integrity impact.
Executive priority
Treat as high-priority availability risk for systems that process untrusted certificates or keys. It is not a data breach vulnerability from the supplied evidence, but it can disrupt customer-facing services and certificate-processing platforms. Patch promptly, especially where OpenSSL is exposed through TLS or customer certificate workflows.
Technical view
CVE-2022-0778 is an infinite loop in OpenSSL BN_mod_sqrt() for non-prime moduli. It is reachable through ASN.1 elliptic-curve parameter parsing, including compressed EC public keys, explicit curve parameters, and crafted private keys. OpenSSL fixed 3.0 in 3.0.2, 1.1.1 in 1.1.1n, and 1.0.2 in 1.0.2zd.
Likely exposure
Exposure is likely anywhere affected OpenSSL versions parse externally supplied certificates, private keys, CSRs, or ASN.1 elliptic-curve parameters. Examples named by OpenSSL include TLS clients, TLS servers using client certificates, hosting providers accepting customer certificates or keys, and certificate authorities parsing subscriber requests.
Exploitation context
The issue is network-reachable in common TLS and certificate-processing flows with low complexity and no authentication, but the provided bundle marks CISA KEV as false. Therefore, active exploitation is not confirmed by the supplied evidence. Impact is availability only according to the CVSS vector.
Researcher notes
The key exposure condition is parsing attacker-controlled elliptic-curve parameters before or during certificate verification. OpenSSL 1.0.2 is slightly harder to trigger during initial parsing, but public-key operations can still reach the loop. Evidence names fixes and affected branches, but does not provide confirmed exploitation status.
Mitigation direction
Upgrade OpenSSL to 3.0.2, 1.1.1n, 1.0.2zd, or vendor-backported fixed packages.
Prioritize internet-facing TLS services and certificate ingestion workflows first.
Apply relevant operating system vendor security updates for packaged OpenSSL builds.
Review products embedding OpenSSL for vendor advisories and fixed firmware or software releases.
Limit unnecessary parsing of untrusted certificates, keys, and CSRs where operationally feasible.
Validation and detection
Inventory OpenSSL versions in operating systems, containers, appliances, and statically linked applications.
Confirm package versions include the CVE-2022-0778 fix or vendor backport.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-835: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-835 · source CWE mapping
Loop with Unreachable Exit Condition ('Infinite Loop')
Loop with Unreachable Exit Condition ('Infinite Loop') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.