{"id":"RUSTSEC-2022-0014","revision":"765004c75590471eb1853b2146bc7578","records":[{"revision":"765004c75590471eb1853b2146bc7578","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2022-0014","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"],"title":"Infinite loop in `BN_mod_sqrt()` reachable when parsing certificates","description":"The `BN_mod_sqrt()` function, which computes a modular square root, contains\na bug that can cause it to loop forever for non-prime moduli.\n\nInternally this function is used when parsing certificates that contain\nelliptic curve public keys in compressed form or explicit elliptic curve\nparameters with a base point encoded in compressed form.\n\nIt is possible to trigger the infinite loop by crafting a certificate that\nhas invalid explicit curve parameters.\n\nSince certificate parsing happens prior to verification of the certificate\nsignature, any process that parses an externally supplied certificate may thus\nbe subject to a denial of service attack. The infinite loop can also be\nreached when parsing crafted private keys as they can contain explicit\nelliptic curve parameters.\n\nThus vulnerable situations include:\n\n - TLS clients consuming server certificates\n - TLS servers consuming client certificates\n - Hosting providers taking certificates or private keys from customers\n - Certificate authorities parsing certification requests from subscribers\n - Anything else which parses ASN.1 elliptic curve parameters\n\nAlso any other applications that use the `BN_mod_sqrt()` where the attacker\ncan control the parameter values are vulnerable to this DoS issue.","state":0,"publishedAt":"2022-03-15T12:00:00+00:00","modifiedAt":"2025-06-10T12:59:30.551888+00:00","affected":[{"ecosystem":"crates.io","name":"openssl-src","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"111.18.0"},{"kind":"introduced","version":"300.0.0"},{"kind":"fixed","version":"300.0.5"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/openssl-src","https://rustsec.org/advisories/RUSTSEC-2022-0014.html","https://www.openssl.org/news/secadv/20220315.txt"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2022-0014","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2022-0014","identifiers":["RUSTSEC-2022-0014","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"]},"retained":false,"historicalAffected":[]}],"coverage":[]}