Junglewise Threat Intelligence

CVE-2023-5678: OpenSSL denial of service via large X9.42 DH parameters

CVE-2023-5678 · Severity: medium · CVSS 5.3 · Published 2023-11-06

Technologies: OpenSSL Foundation OpenSSL.

Executive brief

OpenSSL, a widely used library for secure communications, is vulnerable to a denial-of-service condition when processing certain cryptographic keys. An attacker can provide specially crafted, excessively long Diffie-Hellman (DH) keys or parameters that cause the system to spend an enormous amount of time performing calculations. This can lead to significant processing delays, potentially making the affected service unresponsive to legitimate users.

Technical details

A vulnerability exists in OpenSSL's handling of X9.42 Diffie-Hellman (DH) keys and parameters. The functions DH_generate_key() and DH_check_pub_key() (along with their wrappers like EVP_PKEY_public_check()) fail to sufficiently validate the length of the 'Q' parameter. An attacker providing a key or parameters from an untrusted source with an excessively large Q value can trigger computationally expensive operations, leading to a Denial of Service (DoS) through CPU exhaustion. While DH_check() was previously patched for similar issues, these specific public key check and generation functions remained vulnerable. The OpenSSL SSL/TLS implementation and FIPS providers are reportedly not affected. Fixes are available in the source repository for versions 3.1, 3.0, 1.1.1, and 1.0.2.

Affected products

  • OpenSSL Foundation OpenSSL 3.1, 3.0, 1.1.1, 1.0.2

Timeline

  • 2023-08-16: disclosed: Reported to OpenSSL by David Benjamin (Google)
  • 2023-11-06: advisory: OpenSSL Security Advisory published
  • 2023-11-06: patched: Fixes committed to various OpenSSL branches

References