CVE-2023-5678: Excessive time spent in DH check / generation with large Q parameter value
Vulnerability summary
CVE-2023-5678 is a medium (CVSS 5.3) Unchecked Input for Loop Condition vulnerability in openssl. EPSS estimates a 4.46% chance of exploitation in the next 30 days, higher than 91.4% of scored vulnerabilities.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 15 · Related 7Timeline
- 06-11-2023PublishedVulnerability first disclosed.
- 14-10-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · AlpineEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS trend
Probability
4.46%
Chance of exploitation in the next 30 days
Percentile
91%
Versus all other CVEs
30-day change
No change 0.00 pp
From 4.46% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-606Unchecked Input for Loop ConditionThe product does not properly check inputs that are used for loop conditions, potentially leading to a denial of service or other consequences because of excessive looping.
- CWE-754Improper Check for Unusual or Exceptional ConditionsThe product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Suse45 products
- compat-openssl098&distro=SUSE Linux Enterprise Module for Legacy 12< 0.9.8j-106.61.1
- compat-openssl098&distro=SUSE Linux Enterprise Server for SAP Applications 12 SP5< 0.9.8j-106.61.1
- openssl-1_0_0&distro=SUSE Enterprise Storage 7.1< 1.0.2p-150000.3.88.1
- openssl-1_0_0&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS< 1.0.2p-150000.3.88.1
- openssl-1_0_0&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS< 1.0.2p-150000.3.88.1
Opensuse13 products
- openssl-1_0_0&distro=openSUSE Leap 15.4< 1.0.2p-150000.3.88.1
- openssl-1_0_0&distro=openSUSE Leap 15.5< 1.0.2p-150000.3.88.1
- openssl-1_0_0&distro=openSUSE Tumbleweed< 1.0.2u-23.1
- openssl-1_1&distro=openSUSE Leap 15.4< 1.1.1l-150400.7.60.2
- openssl-1_1&distro=openSUSE Leap 15.5< 1.1.1l-150500.17.22.1
Chainguard4 products
- eco-dotnet-libssl-1.0All versions (No fix recorded)
- openssl< 3.1.4-r1
- openssl-provider-fipsAll versions (No fix recorded)
- openssl-provider-fips-3.1.2All versions (No fix recorded)
Ubuntu4 products
- edk2All versions (No fix recorded) | < 2022.02-3ubuntu0.22.04.4 | < 2024.02-2ubuntu0.6
- nodejsAll versions (No fix recorded)
- openssl< 1.0.2g-1ubuntu4.20+esm11 | < 1.0.2g-1ubuntu4.fips.4.20.11 | All versions (No fix recorded) | < 1.1.1-1ubuntu2.1~18.04.23+esm4 | < 1.1.1-1ubuntu2.fips.2.1~18.04.23.4 | < 1.1.1f-1ubuntu2.21 | < 1.1.1f-1ubuntu2.fips.21 | < 3.0.2-0ubuntu1.14 | < 3.0.2-0ubuntu1.14+Fips1 | < 3.0.10-1ubuntu4
- openssl1.0< 1.0.2n-1ubuntu5.13+esm1
Alpine1 product
- openssl≥ 1.0.2, < 1.1.1w-r1 | ≥ 1.0.2, < 3.0.12-r1 | ≥ 1.0.2, < 3.1.4-r1
Debian1 product
- openssl< 3.0.13-1~deb12u1 | < 3.0.12-2
Openssl1 product
- openssl≥ 1.0.2, < 1.0.2zj | ≥ 1.1.1, < 1.1.1x | ≥ 3.0.0, < 3.0.13 | ≥ 3.1.0, < 3.1.5
Wolfi1 product
- openssl< 3.1.4-r1
8 vendors · 70 products