Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-0778

openssl: Infinite loop in BN_mod_sqrt() reachable when parsing certificates

Overview

Published
15 Mar 2022
Modified
14 Oct 2026
High CVE
10 Registry packages
147 OS packages
19 Linux distributions
Yes Fix available

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

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness: CWE-835

Affected packages · 10

Packages affected by CVE-2022-0778
EcosystemPackageVulnerableFixed in
Bitnami mariadb >=10.2.0, <10.2.42>=10.3.0, <10.3.33>=10.4.0, <10.4.23>=10.5.0, <10.5.14>=10.6.0, <10.6.6+1 more 10.2.4210.3.3310.4.2310.5.1410.6.6
Bitnami mariadb-min >=10.2.0, <10.2.42>=10.3.0, <10.3.33>=10.4.0, <10.4.23>=10.5.0, <10.5.14>=10.6.0, <10.6.6+1 more 10.2.4210.3.3310.4.2310.5.1410.6.6
Bitnami mysql-client >=10.2.0, <10.2.42>=10.3.0, <10.3.33>=10.4.0, <10.4.23>=10.5.0, <10.5.14>=10.6.0, <10.6.6+1 more 10.2.4210.3.3310.4.2310.5.1410.6.6
Bitnami node >=12.0.0, <12.12.1>=12.13.0, <12.22.11>=14.0.0, <14.14.1>=14.15.0, <14.19.1>=16.0.0, <16.12.1+2 more 12.12.112.22.1114.14.114.19.116.12.1
Bitnami node-min >=12.0.0, <12.12.1>=12.13.0, <12.22.11>=14.0.0, <14.14.1>=14.15.0, <14.19.1>=16.0.0, <16.12.1+2 more 12.12.112.22.1114.14.114.19.116.12.1
Cargo (Rust) openssl-src >=300.0.0, <300.0.5<111.18.0 300.0.5111.18.0
Conan (C/C++) openssl >=1.0.2 <1.0.2zd||>=1.1.0 <1.1.1n||>=3.0.0 <3.0.2 1.0.2zd1.1.1n3.0.2
Julia libnode_jll <16.17.0+0 16.17.0+0
Julia Openresty_jll <1.21.4+0 1.21.4+0
Julia OpenSSL_jll <1.1.14+0 1.1.14+0

Open a package to see all its vulnerabilities.

Operating systems · 124 fixes

Azure Linux 1 release · 1 package

fixed 1
edk2
Azure Linux fixes for CVE-2022-0778
ReleasePackageFixed in
3.0 edk2 0:20240223gitedc6681206c1-1.azl3

Oracle Linux 3 releases · 3 packages

fixed 7
openssl compat-openssl10 compat-openssl11
Oracle Linux fixes for CVE-2022-0778
ReleasePackageFixed in
7 openssl +4 10:1.0.2k-25.el7_9_fips
7 openssl +4 1:1.0.2k-25.el7_9
7 openssl +4 2:1.0.2k-25.ksplice1.el7_9
8 compat-openssl10 1:1.0.2o-4.el8_6
8 openssl +3 1:1.1.1k-6.el8_5
8 openssl +5 2:1.1.1k-6.ksplice1.el8_5

1 more row

Photon OS 1 release · 1 package

fixed 1
openssl
Photon OS fixes for CVE-2022-0778
ReleasePackageFixed in
4.0 openssl +4 3.0.0-5.ph4

Red Hat 3 releases · 19 packages

fixed 43
jbcs-httpd24-openssl-pkcs11 jbcs-httpd24-openssl-chil jbcs-httpd24-mod-http2 jws5-tomcat-native jbcs-httpd24-mod-jk-ap24 jbcs-httpd24-mod-cluster-native +13
Red Hat fixes for CVE-2022-0778
ReleasePackageFixed inAdvisory
7 jbcs-httpd24-openssl-pkcs11 0:0.4.10-26.jbcs.el7 RHSA-2022:1389
7 jbcs-httpd24-openssl-chil 0:1.0.0-11.jbcs.el7 RHSA-2022:1389
7 jbcs-httpd24-mod-http2 0:1.15.7-22.jbcs.el7 RHSA-2022:1389
7 jws5-tomcat-native 0:1.2.30-4.redhat_4.el7jws RHSA-2022:1519
7 jbcs-httpd24-mod-jk-ap24 +1 0:1.2.48-29.redhat_1.jbcs.el7 RHSA-2022:1389
7 jbcs-httpd24-mod-cluster-native 0:1.3.16-10.Final_redhat_2.jbcs.el7 RHSA-2022:1389

37 more rows

SUSE Linux Enterprise 1 release · 3 packages

fixed 3
libopenssl0-9-8 libopenssl-1-0-0-devel libopenssl-1-1-devel
SUSE Linux Enterprise fixes for CVE-2022-0778
ReleasePackageFixed inAdvisory
12.5 libopenssl0-9-8 0.9.8j-106.33.1 SUSE-SU-2022:0859-1
12.5 libopenssl-1-0-0-devel +7 1.0.2p-3.48.1 SUSE-SU-2022:0857-1
12.5 libopenssl-1-1-devel +6 1.1.1d-2.61.1 SUSE-SU-2022:0860-1

SUSE Linux Enterprise Micro 1 release · 4 packages

fixed 4
libopenssl-1-1-devel libz1 glibc libcrypt1
SUSE Linux Enterprise Micro fixes for CVE-2022-0778
ReleasePackageFixed inAdvisory
5.2 libopenssl-1-1-devel +3 1.1.1d-11.43.1 SUSE-SU-2022:0861-1
5.2 libz1 1.2.11-3.26.10 SUSE-SU-2022:0861-1
5.2 glibc +2 2.31-150300.20.7 SUSE-SU-2022:0861-1
5.2 libcrypt1 4.4.15-150300.4.2.41 SUSE-SU-2022:0861-1

alma 1 release · 2 packages

fixed 2
compat-openssl10 openssl
alma fixes for CVE-2022-0778
ReleasePackageFixed in
8 compat-openssl10 1:1.0.2o-4.el8_6
8 openssl +3 1:1.1.1k-6.el8_5

alpine 4 releases · 5 packages

fixed 20
openjdk11 lighthouse openssl libressl libretls
alpine fixes for CVE-2022-0778
ReleasePackageFixed in
3.22 openjdk11 11.0.15_p10-r0
3.22 lighthouse 2.2.0-r0
3.22 openssl 3.0.2-r0
3.22 libressl 3.4.3-r0
3.22 libretls 3.5.1-r0
3.23 openjdk11 11.0.15_p10-r0

14 more rows

amazon linux 1 release · 2 packages

fixed 2
openssl mariadb105
amazon linux fixes for CVE-2022-0778
ReleasePackageFixed in
2023 openssl +6 1:3.0.5-1.amzn2023.0.4
2023 mariadb105 +27 3:10.5.16-1.amzn2023.0.7

debian 6 releases · 2 packages

fixed 7
openssl openssl1-0
debian fixes for CVE-2022-0778
ReleasePackageFixed in
10 openssl 1.1.1d-0+deb10u8
11 openssl 1.1.1k-1+deb11u2
12 openssl 1.1.1n-1
13 openssl 1.1.1n-1
14 openssl 1.1.1n-1
9 openssl1-0 1.0.2u-1~deb9u7

1 more row

echo 1 release · 5 packages

fixed 5
openssl-1-0-1g openssl-1-1-1c openssl-1-1-1g openssl-1-1-1k openssl
echo fixes for CVE-2022-0778
ReleasePackageFixed in
openssl-1-0-1g 1.0.1g+e1
openssl-1-1-1c 1.1.1c+e1
openssl-1-1-1g 1.1.1g+e1
openssl-1-1-1k 1.1.1k+e1
openssl 1.1.1n-1

openSUSE 1 release · 6 packages

fixed 6
python310-ecdsa python311-ecdsa libopenssl-1-1-devel cargo-audit-advisory-db libopenssl-3-devel libcrypto47
openSUSE fixes for CVE-2022-0778
ReleasePackageFixed inAdvisory
Tumbleweed python310-ecdsa +2 0.18.0-1.1 openSUSE-SU-2024:12444-1
Tumbleweed python311-ecdsa +2 0.19.1-1.1 openSUSE-SU-2025:14965-1
Tumbleweed libopenssl-1-1-devel +7 1.1.1n-1.1 openSUSE-SU-2024:11933-1
Tumbleweed cargo-audit-advisory-db 20220323-1.1 openSUSE-SU-2024:11953-1
Tumbleweed libopenssl-3-devel +5 3.0.2-1.1 openSUSE-SU-2024:11927-1
Tumbleweed libcrypto47 +9 3.4.3-1.1 openSUSE-SU-2024:11944-1

rocky 2 releases · 3 packages

fixed 3
compat-openssl10 openssl compat-openssl11
rocky fixes for CVE-2022-0778
ReleasePackageFixed in
8 compat-openssl10 1:1.0.2o-4.el8_6
8 openssl +3 1:1.1.1k-6.el8_5
9 compat-openssl11 1:1.1.1k-4.el9_0

root.io alpine 1 release · 1 package

fixed 1
rootio-openssl
root.io alpine fixes for CVE-2022-0778
ReleasePackageFixed in
3.23 rootio-openssl 3.0.2-r0

root.io debian 2 releases · 1 package

fixed 2
rootio-openssl
root.io debian fixes for CVE-2022-0778
ReleasePackageFixed in
11 rootio-openssl 1.1.1k-1+deb11u2
12 rootio-openssl 1.1.1n-1

seal Red Hat 1 release · 1 package

fixed 2
openssl
seal Red Hat fixes for CVE-2022-0778
ReleasePackageFixed in
7 openssl +1 1:1.0.2k-25.el7_9+sp999
7 openssl +1 1:1.0.2k-26.el7_9+sp999

ubuntu 7 releases · 4 packages

fixed 11 affected 2
openssl1-0 openssl edk2 nodejs
ubuntu fixes for CVE-2022-0778
ReleasePackageFixed in
18.04 openssl1-0 1.0.2n-1ubuntu5.8
18.04 openssl 1.1.1-1ubuntu2.1~18.04.15
18.04-ESM edk2 affected
18.04-ESM openssl1-0 1.0.2n-1ubuntu5.8
18.04-ESM openssl 1.1.1-1ubuntu2.1~18.04.15
20.04 openssl 1.1.1f-1ubuntu2.12

7 more rows

chainguard 1 release · 1 package

not affected 1
ruby-3-1
chainguard fixes for CVE-2022-0778
ReleasePackageFixed in
ruby-3-1 not affected

wolfi 1 release · 1 package

not affected 1
ruby-3-1
wolfi fixes for CVE-2022-0778
ReleasePackageFixed in
ruby-3-1 not affected

References

Show all 63 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.