CVEfocus › CVE database › CVE-2023-5678

CVE-2023-5678Excessive time spent in DH check / generation with large Q parameter value

CVSS 5.3 MediumEPSS 4.3% (higher than 92% of CVEs)Published 2023-11-06Updated 2026-10-14Assigner: openssl

Issue summary: Generating excessively long X9.42 DH keys or checking excessively long X9.42 DH keys or parameters may be very slow. Impact summary: Applications that use the functions DH_generate_key() to generate an X9.42 DH key may experience long delays. Likewise, applications that use DH_check_pub_key(), DH_check_pub_key_ex() or EVP_PKEY_public_check() to check an X9.42 DH key or X9.42 DH parameters may experience long delays. Where the key or parameters that are being checked have been obtained from an untrusted source this may lead to a Denial of Service. While DH_check() performs all the necessary checks (as of CVE-2023-3817), DH_check_pub_key() doesn't make any of these checks, and is therefore vulnerable for excessively large P and Q parameters. Likewise, while DH_generate_key() performs a check for an excessively large P, it doesn't check for an excessively large Q. An application that calls DH_generate_key() or DH_check_pub_key() and supplies a key or parameters obtained from an untrusted source could be vulnerable to a Denial of Service attack. DH_generate_key() and DH_check_pub_key() are also called by a number of other OpenSSL functions. An application calling any of those other functions may similarly be affected. The other functions affected by this are DH_check_pub_key_ex(), EVP_PKEY_public_check(), and EVP_PKEY_generate(). Also vulnerable are the OpenSSL pkey command line application when using the "-pubcheck" option, as well as the OpenSSL genpkey command line application. The OpenSSL SSL/TLS implementation is not affected by this issue. The OpenSSL 3.0 and 3.1 FIPS providers are not affected by this issue.

CWE-606

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

35Fixed
15Fix pending
4Will not fix
6Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04edk2Not affected
vulnerable_code_not_present
Ubuntu 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10edk2Not affected
vulnerable_code_not_present
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04edk2Fixed2024.02-2ubuntu0.6UBUNTU-CVE-2023-5678
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04opensslFixed3.0.10-1ubuntu4UBUNTU-CVE-2023-5678
Ubuntu 22.04edk2Fixed2022.02-3ubuntu0.22.04.4UBUNTU-CVE-2023-5678
Ubuntu 22.04nodejsFix pendingUBUNTU-CVE-2023-5678
Ubuntu 22.04opensslFixed3.0.2-0ubuntu1.14UBUNTU-CVE-2023-5678
Ubuntu 20.04edk2Fix pendingUBUNTU-CVE-2023-5678
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.21UBUNTU-CVE-2023-5678
Ubuntu 18.04edk2Fix pendingUBUNTU-CVE-2023-5678
Ubuntu 18.04opensslFix pending1.1.1-1ubuntu2.1~18.04.23+esm4 (Ubuntu Pro)UBUNTU-CVE-2023-5678
Ubuntu 18.04openssl1.0Fix pending1.0.2n-1ubuntu5.13+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-5678
Ubuntu 16.04edk2Fix pendingUBUNTU-CVE-2023-5678
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFix pending1.0.2g-1ubuntu4.20+esm11 (Ubuntu Pro)UBUNTU-CVE-2023-5678
Ubuntu 14.04edk2Fix pending
Debian 14opensslFixed3.0.12-2DEBIAN-CVE-2023-5678
Debian 13opensslFixed3.0.12-2DEBIAN-CVE-2023-5678
Debian 12opensslFixed3.0.13-1~deb12u1DEBIAN-CVE-2023-5678
Red Hat Enterprise Linux 9compat-openssl11Fix pending
Fix deferred
Red Hat Enterprise Linux 9opensslFixed1:3.0.7-27.el9RHSA-2024:2447
Red Hat Enterprise Linux 9openssl-develFixed1:3.0.7-27.el9RHSA-2024:2447
Red Hat Enterprise Linux 9openssl-libsFixed1:3.0.7-27.el9RHSA-2024:2447
Red Hat Enterprise Linux 9openssl-perlFixed1:3.0.7-27.el9RHSA-2024:2447
Red Hat Enterprise Linux 8compat-openssl10Fix pending
Fix deferred
Red Hat Enterprise Linux 8opensslFixed1:1.1.1k-12.el8_9RHSA-2023:7877
Red Hat Enterprise Linux 8openssl-develFixed1:1.1.1k-12.el8_9RHSA-2023:7877
Red Hat Enterprise Linux 8openssl-libsFixed1:1.1.1k-12.el8_9RHSA-2023:7877
Red Hat Enterprise Linux 8openssl-perlFixed1:1.1.1k-12.el8_9RHSA-2023:7877
Red Hat Enterprise Linux 7opensslFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-libsFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-staticFix pending
Fix deferred
Red Hat Enterprise Linux 6opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-staticWill not fix
Out of support scope
AlmaLinux 9opensslFixed1:3.0.7-27.el9ALSA-2024:2447
AlmaLinux 9openssl-develFixed1:3.0.7-27.el9ALSA-2024:2447
AlmaLinux 9openssl-libsFixed1:3.0.7-27.el9ALSA-2024:2447
AlmaLinux 9openssl-perlFixed1:3.0.7-27.el9ALSA-2024:2447
AlmaLinux 8opensslFixed1:1.1.1k-12.el8_9ALSA-2023:7877
AlmaLinux 8openssl-develFixed1:1.1.1k-12.el8_9ALSA-2023:7877
AlmaLinux 8openssl-libsFixed1:1.1.1k-12.el8_9ALSA-2023:7877
AlmaLinux 8openssl-perlFixed1:1.1.1k-12.el8_9ALSA-2023:7877
Rocky Linux 8opensslFixed1:1.1.1k-12.el8_9RLSA-2023:7877
Alpine Linux 3.24opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.23opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.22opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.21opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.20opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.19opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.18opensslFixed3.1.4-r1ALPINE-CVE-2023-5678
Alpine Linux 3.17opensslFixed3.0.12-r1ALPINE-CVE-2023-5678
Alpine Linux 3.16opensslFixed1.1.1w-r1ALPINE-CVE-2023-5678
Alpine Linux 3.15opensslFixed1.1.1w-r1ALPINE-CVE-2023-5678

What the vendor says

As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.