Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀
🦀 crates.io
Not in CISA KEV
HIGH severity

CVE-2022-0778 — openssl-src

HIGH

CVE-2022-0778 is a high-severity (CVSS 7.5) CWE-835 vulnerability in openssl-src. 6 public exploit references exist, so weaponization risk is real. A fix is available for openssl-src — see the affected versions and patch details below.

Infinite loop in BN_mod_sqrt() reachable when parsing certificates

Also known asBIT-mariadb-2022-0778BIT-mariadb-min-2022-0778BIT-mysql-client-2022-0778BIT-node-2022-0778BIT-node-min-2022-0778GHSA-x3mh-jvjw-3xwx
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
6 known
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-0778.

EPSS Exploitation Probability

via FIRST.org ↗
73.2%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs99th percentile — riskier than 99% of all scored CVEsHighest risk
0.00%31.1%62.3%93.4%7.4%73.2%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2022-0778 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🦀openssl-src🦀openssl-src

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

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).

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.ioopenssl-src≥ 300.0.0&&< 300.0.5300.0.5cargo update -p openssl-src --precise 300.0.5
🦀crates.ioopenssl-srcall versions111.18.0cargo update -p openssl-src --precise 111.18.0

Affected Products

13 products · 30 configurations
OS
debian linuxdebian
3 versions
9.010.011.0
OS
fedorafedoraproject
2 versions
3436
Application
mariadbmariadb
≥ 10.7.0 && < 10.7.2
range
OS
500f firmwarenetapp
all
OS
a250 firmwarenetapp
all
Application
cloud volumes ontap mediatornetapp
all
Exploits & PoCs
6

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for openssl-src, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update openssl-src to 300.0.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-0778 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

While Red Hat initially stated not to be directly affected by this flaw, after further investigation we found that the versions of OpenSSL as shipped in Red Hat Enterprise Linux 6, 7, and 8 are vulnerable to a denial of service attack through malicious Elliptic Curve parameters. During processing of the parameters…

Workaround published by Red Hat
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.
Source: Red Hat security advisory for CVE-2022-0778 (CC BY 4.0)
ProductFixed inAdvisory
JBoss Core Services for RHEL 8jbcs-httpd24-apr-util-0:1.6.1-91.el8jbcsRHSA-2022:1389
Red Hat Enterprise Linux 6 Extended Lifecycle Supportopenssl-0:1.0.1e-60.el6_10RHSA-2022:1073
Red Hat Enterprise Linux 7openssl-1:1.0.2k-25.el7_9RHSA-2022:1066
Red Hat Enterprise Linux 7.3 Advanced Update Supportopenssl-1:1.0.1e-62.el7_3RHSA-2022:1082
Red Hat Enterprise Linux 7.4 Advanced Update Supportopenssl-1:1.0.2k-10.el7_4RHSA-2022:1076
Red Hat Enterprise Linux 7.6 Advanced Update Supportopenssl-1:1.0.2k-18.el7_6RHSA-2022:1078
Red Hat Enterprise Linux 7.7 Advanced Update Supportopenssl-1:1.0.2k-21.el7_7RHSA-2022:1077
Red Hat Enterprise Linux 8compat-openssl10-1:1.0.2o-4.el8_6RHSA-2022:5326

Frequently Asked Questions

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 ma
O3 Security · Impact-Aware SCA

Is CVE-2022-0778 in your dependencies?

Find it across crates.io, including transitive dependencies.

CVE-2022-0778: openssl-src DoS — Fixed in 300.0.5