CVE-2023-5678Excessive time spent in DH check / generation with large Q parameter value
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | edk2 | Fixed | 2024.02-2ubuntu0.6 | UBUNTU-CVE-2023-5678 |
| Ubuntu 24.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | openssl | Fixed | 3.0.10-1ubuntu4 | UBUNTU-CVE-2023-5678 |
| Ubuntu 22.04 | edk2 | Fixed | 2022.02-3ubuntu0.22.04.4 | UBUNTU-CVE-2023-5678 |
| Ubuntu 22.04 | nodejs | Fix pending | UBUNTU-CVE-2023-5678 | |
| Ubuntu 22.04 | openssl | Fixed | 3.0.2-0ubuntu1.14 | UBUNTU-CVE-2023-5678 |
| Ubuntu 20.04 | edk2 | Fix pending | UBUNTU-CVE-2023-5678 | |
| Ubuntu 20.04 | openssl | Fixed | 1.1.1f-1ubuntu2.21 | UBUNTU-CVE-2023-5678 |
| Ubuntu 18.04 | edk2 | Fix pending | UBUNTU-CVE-2023-5678 | |
| Ubuntu 18.04 | openssl | Fix pending | 1.1.1-1ubuntu2.1~18.04.23+esm4 (Ubuntu Pro) | UBUNTU-CVE-2023-5678 |
| Ubuntu 18.04 | openssl1.0 | Fix pending | 1.0.2n-1ubuntu5.13+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-5678 |
| Ubuntu 16.04 | edk2 | Fix pending | UBUNTU-CVE-2023-5678 | |
| Ubuntu 16.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | openssl | Fix pending | 1.0.2g-1ubuntu4.20+esm11 (Ubuntu Pro) | UBUNTU-CVE-2023-5678 |
| Ubuntu 14.04 | edk2 | Fix pending | ||
| Debian 14 | openssl | Fixed | 3.0.12-2 | DEBIAN-CVE-2023-5678 |
| Debian 13 | openssl | Fixed | 3.0.12-2 | DEBIAN-CVE-2023-5678 |
| Debian 12 | openssl | Fixed | 3.0.13-1~deb12u1 | DEBIAN-CVE-2023-5678 |
| Red Hat Enterprise Linux 9 | compat-openssl11 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | openssl | Fixed | 1:3.0.7-27.el9 | RHSA-2024:2447 |
| Red Hat Enterprise Linux 9 | openssl-devel | Fixed | 1:3.0.7-27.el9 | RHSA-2024:2447 |
| Red Hat Enterprise Linux 9 | openssl-libs | Fixed | 1:3.0.7-27.el9 | RHSA-2024:2447 |
| Red Hat Enterprise Linux 9 | openssl-perl | Fixed | 1:3.0.7-27.el9 | RHSA-2024:2447 |
| Red Hat Enterprise Linux 8 | compat-openssl10 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | openssl | Fixed | 1:1.1.1k-12.el8_9 | RHSA-2023:7877 |
| Red Hat Enterprise Linux 8 | openssl-devel | Fixed | 1:1.1.1k-12.el8_9 | RHSA-2023:7877 |
| Red Hat Enterprise Linux 8 | openssl-libs | Fixed | 1:1.1.1k-12.el8_9 | RHSA-2023:7877 |
| Red Hat Enterprise Linux 8 | openssl-perl | Fixed | 1:1.1.1k-12.el8_9 | RHSA-2023:7877 |
| Red Hat Enterprise Linux 7 | openssl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | openssl-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | openssl-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | openssl-perl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | openssl-static | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | openssl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | openssl-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | openssl-perl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | openssl-static | Will not fix Out of support scope | ||
| AlmaLinux 9 | openssl | Fixed | 1:3.0.7-27.el9 | ALSA-2024:2447 |
| AlmaLinux 9 | openssl-devel | Fixed | 1:3.0.7-27.el9 | ALSA-2024:2447 |
| AlmaLinux 9 | openssl-libs | Fixed | 1:3.0.7-27.el9 | ALSA-2024:2447 |
| AlmaLinux 9 | openssl-perl | Fixed | 1:3.0.7-27.el9 | ALSA-2024:2447 |
| AlmaLinux 8 | openssl | Fixed | 1:1.1.1k-12.el8_9 | ALSA-2023:7877 |
| AlmaLinux 8 | openssl-devel | Fixed | 1:1.1.1k-12.el8_9 | ALSA-2023:7877 |
| AlmaLinux 8 | openssl-libs | Fixed | 1:1.1.1k-12.el8_9 | ALSA-2023:7877 |
| AlmaLinux 8 | openssl-perl | Fixed | 1:1.1.1k-12.el8_9 | ALSA-2023:7877 |
| Rocky Linux 8 | openssl | Fixed | 1:1.1.1k-12.el8_9 | RLSA-2023:7877 |
| Alpine Linux 3.24 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.23 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.22 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.21 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.20 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.19 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.18 | openssl | Fixed | 3.1.4-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.17 | openssl | Fixed | 3.0.12-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.16 | openssl | Fixed | 1.1.1w-r1 | ALPINE-CVE-2023-5678 |
| Alpine Linux 3.15 | openssl | Fixed | 1.1.1w-r1 | ALPINE-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.
- OpenSSL: affected: 1.0.2 to before 1.0.2zj, 1.1.1 to before 1.1.1x, 3.0.0 to before 3.0.13, 3.1.0 to before 3.1.5; fixed in
1.0.2zj,1.1.1x,3.0.13,3.1.5
Vendor advisories:
- https://www.openssl.org/news/secadv/20231106.txt (vendor-advisory)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=34efaef6c103d636ab507a0cc34d… (patch)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=710fee740904b6290fef0dd5536f… (patch)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=db925ae2e65d0d925adef429afc3… (patch)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=ddeb4b6c6d527e54ce9a99cba785… (patch)
References
- https://www.openssl.org/news/secadv/20231106.txt
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=34efaef6c103d636ab507a0cc34dca4d3aecc055
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=710fee740904b6290fef0dd5536fbcedbc38ff0c
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=db925ae2e65d0d925adef429afc37f75bd1c2017
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6
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.