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 i
- Products
- mariadb-min
- Affected versions
- Not specified
- Fixed versions
- 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2
- CVEs
- CVE-2022-0778
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 19:50 UTC · Revision 1
Source evidence
Infinite loop in BN_mod_sqrt() reachable when parsing certificates
core-osv · Original sourcePublished 10 Jun 2025, 11:49 UTC
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 i
osv:BIT-mariadb-min-2022-0778
mariadb-min
Fixed versions: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2
Complete source record
{
"id": "e42ae6b9cdd04435231d11b45b1e4975597346fbf6f9d722eaec71f4a01e8071",
"url": "https://osv.dev/vulnerability/BIT-mariadb-min-2022-0778",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Infinite loop in BN_mod_sqrt() reachable when parsing certificates",
"summary": "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 i",
"evidence": "osv:BIT-mariadb-min-2022-0778",
"products": [
{
"name": {
"value": "mariadb-min",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "10.2.42",
"evidence": "/affected/0/ranges"
},
{
"value": "10.3.33",
"evidence": "/affected/0/ranges"
},
{
"value": "10.4.23",
"evidence": "/affected/0/ranges"
},
{
"value": "10.5.14",
"evidence": "/affected/0/ranges"
},
{
"value": "10.6.6",
"evidence": "/affected/0/ranges"
},
{
"value": "10.7.2",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "BIT-mariadb-min-2022-0778",
"aliases": [
"BIT-mariadb-2022-0778",
"BIT-mariadb-min-2022-0778",
"BIT-mysql-client-2022-0778",
"BIT-node-2022-0778",
"BIT-node-min-2022-0778",
"CVE-2022-0778",
"GHSA-x3mh-jvjw-3xwx",
"RUSTSEC-2022-0014"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "10.2.0"
},
{
"fixed": "10.2.42"
},
{
"introduced": "10.3.0"
},
{
"fixed": "10.3.33"
},
{
"introduced": "10.4.0"
},
{
"fixed": "10.4.23"
},
{
"introduced": "10.5.0"
},
{
"fixed": "10.5.14"
},
{
"introduced": "10.6.0"
},
{
"fixed": "10.6.6"
},
{
"introduced": "10.7.0"
},
{
"fixed": "10.7.2"
}
]
}
],
"package": {
"name": "mariadb-min",
"purl": "pkg:bitnami/mariadb-min",
"ecosystem": "Bitnami"
},
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"database_specific": {
"source": "https://github.com/bitnami/vulndb/tree/main/data/mariadb-min/BIT-mariadb-min-2022-0778.json"
}
}
],
"modified": "2026-10-16T09:45:12.199140516Z",
"provider": "osv",
"references": [
"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",
"https://lists.debian.org/debian-lts-announce/2022/03/msg00024.html",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/323SNN6ZX7PRJJWP2BUAFLPUAE42XWLZ/",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GDB3GQVJPXJE7X5C5JN6JAA4XUDWD6E6/",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W6K3PR542DXWLEFFMFIDMME4CWMHJRMG/",
"https://nvd.nist.gov/vuln/detail/CVE-2022-0778",
"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0002",
"https://security.gentoo.org/glsa/202210-02",
"https://security.netapp.com/advisory/ntap-20220321-0002/",
"https://security.netapp.com/advisory/ntap-20220429-0005/",
"https://security.netapp.com/advisory/ntap-20240621-0006/",
"https://support.apple.com/kb/HT213255",
"https://support.apple.com/kb/HT213256",
"https://support.apple.com/kb/HT213257",
"https://www.debian.org/security/2022/dsa-5103",
"https://www.openssl.org/news/secadv/20220315.txt",
"https://www.oracle.com/security-alerts/cpuapr2022.html",
"https://www.oracle.com/security-alerts/cpujul2022.html",
"https://www.tenable.com/security/tns-2022-06",
"https://www.tenable.com/security/tns-2022-07",
"https://www.tenable.com/security/tns-2022-08",
"https://www.tenable.com/security/tns-2022-09"
],
"provider_metadata": {
"cpes": [
"cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*"
],
"severity": "High"
}
},
"related_cves": [
{
"value": "CVE-2022-0778",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 338208,
"published_at": "2025-06-10T11:49:27.748+00:00"
}