Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessOpen unauthenticated connection to wolfSSH server
-
DeliveryNegotiate diffie-hellman-group-exchange-sha256 in KEXINIT
-
ExploitSend message 31 with 8192-bit RFC 3526 safe prime
-
ExecutionServer runs client-role DoKexDhGexGroup primality tests
-
ImpactRepeat connections to exhaust server CPU
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Exploitable only when the wolfSSH server is built with DH group-exchange SHA256 support - i.e. NOT compiled with WOLFSSH_NO_DH_GEX_SHA256, WOLFSSH_NO_DH, or NO_SHA256 (any of which make it unaffected) - and the attacker negotiates the diffie-hellman-group-exchange-sha256 KEX algorithm, then sends SSH_MSG_KEX_DH_GEX_GROUP (31) in the window after the server processes the client's KEXINIT (handshake->expectMsgId unset). No authentication, user interaction, or special network position is required against such a build (PR:N/UI:N/AV:N). Limiting factors: impact is bounded to per-connection CPU cost (worst case the two 8192-bit Miller-Rabin tests on 1.5.0; versions 1.2.0-1.4.22 reach the same code path but without the primality cost), there is no memory corruption or data exposure, and message 33 is admitted but rejected before any cryptography because no public-key-check callback is registered. |
| Impact | This is a pre-authentication denial-of-service/CPU-exhaustion issue, not a memory-corruption or data-exposure flaw, and the signals agree that it is a real but modest priority. The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) correctly reflects remote, unauthenticated, low-complexity reachability, while the impact metrics (VC:N/VI:N/VA:L, SC/SI/SA:N) correctly cap the damage at limited availability loss - consistent with CWE-372 (incomplete internal state/role distinction) rather than RCE. A server that negotiates diffie-hellman-group-exchange-sha256 can be made to run two 8-round Miller-Rabin tests on attacker-chosen values up to 8192 bits (worst case: RFC 3526 safe primes, free to obtain) per connection, giving an attacker cheap asymmetric CPU cost - but the effect is per-connection and bounded, not amplified, persistent, or crash-inducing, which is why the score lands at 6.9 (MEDIUM) and not higher. No EPSS score, CISA KEV listing, or public POC is present in the input, so there is no evidence of active exploitation or weaponization; the finding was self-reported by wolfSSL and a patch exists. Note a signal conflict to verify: the input Tags label this 'Information Disclosure,' but the CVSS vector shows VC:N (no confidentiality impact) and the description is purely resource-consumption - treat the tag as mislabeled. Net: patch during normal maintenance windows; it is not a drop-everything emergency absent evidence of targeting. |
| Exploit ScenarioDerived | An attacker opens an unauthenticated SSH connection to a wolfSSH server, completes KEXINIT negotiating diffie-hellman-group-exchange-sha256, then sends the server-to-client message SSH_MSG_KEX_DH_GEX_GROUP (31) carrying a large RFC 3526 safe prime. The server wrongly runs the client-side handler and burns CPU on two 8-round Miller-Rabin primality tests over an up-to-8192-bit value, which repeated across many connections degrades server availability. No public exploit code is identified at time of analysis, and the low attack complexity (AC:L) with no authentication means the message sequence is trivial to script. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Pre-authentication CPU exhaustion affects wolfSSH servers through 1.5.0 that are built with Diffie-Hellman group-exchange SHA256 support, letting a remote unauthenticated client force the server to execute client-role key-exchange logic. After negotiating diffie-hellman-group-exchange-sha256, the attacker sends SSH_MSG_KEX_DH_GEX_GROUP (31) - a message only a client should send - and the server runs the client-side handler DoKexDhGexGroup(), performing two 8-round Miller-Rabin primality tests on an attacker-supplied prime of up to 8192 bits and then generating a Diffie-Hellman key pair in the attacker's group. The flaw yields only availability impact (CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) with no memory corruption or data exposure; no public exploit code has been identified at time of analysis and it is not confirmed as actively exploited.
RemediationAI
Patch status: Upstream fix available (PR/commit); released patched version not independently confirmed - the fix reverts the direction check in IsMessageAllowedServer() so that MSGID_KEXDH_REPLY and MSGID_KEXDH_GEX_REPLY (the latter aliasing MSGID_KEXDH_GEX_GROUP) are rejected when received by a server, as captured in pull request https://github.com/wolfSSL/wolfssh/pull/1221 and commit https://github.com/wolfSSL/wolfssh/commit/a472f1ee2b653f623d85ef2297321733f1dbfd22. Apply that commit or the PR change on top of the affected 1.2.0-1.5.0 builds, or upgrade to a release that includes it once a tagged version is confirmed. If patching cannot be done immediately, recompile the server with WOLFSSH_NO_DH_GEX_SHA256 (or, more broadly, WOLFSSH_NO_DH or NO_SHA256) to remove the vulnerable code path entirely; the trade-off is loss of DH group-exchange SHA256 negotiation, which is acceptable when ECDH/curve25519 KEX remains enabled but can break interoperability with old clients that only offer GEX. Because the exposure is per-connection CPU cost, also cap concurrent in-flight handshakes and per-source connection rates and tune handshake/idle timeouts so a single attacker cannot exhaust the worker pool; these are only rate-limit mitigations and slow rather than eliminate the per-connection Miller-Rabin cost, and aggressive caps can reject legitimate bursty clients. There is no vendor-released patch version number to cite from the provided data, so verify the exact release containing the commit before advertising a fixed version.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is an incomplete direction/role distinction (CWE-372) inside IsMessageAllowedServer() in src/internal.c. The function applies no sender-direction check to the key-exchange message range: when the peer is keying and no specific message is expected - the state a server occupies for the entire window after it processes the client's KEXINIT, because handshake->expectMsgId is never set there - it falls through the expectation branch without a verdict and reaches a numeric bound that admits every message id from 30 through 34. As a result a server accepts client-only messages such as SSH_MSG_KEX_DH_GEX_GROUP (31) and SSH_MSG_KEX_DH_GEX_REPLY (33), which are defined by RFC 4419 for the Diffie-Hellman Group Exchange key exchange. Message 31 is the dangerous one: it drives the server into DoKexDhGexGroup(), the client-side handler, which validates the attacker-supplied group with two 8-round Miller-Rabin primality tests - one on p and one on (p-1)/2 - for values up to 8192 bits, then returns success, causing the server to store the attacker's prime and generator, derive a DH key pair in that group, and emit the client-role SSH_MSG_KEX_DH_GEX_INIT (32) back to the peer. Published RFC 3526 safe primes are the worst-case input and cost the attacker nothing to obtain. The primality validation was introduced in 1.5.0; versions 1.2.0 through 1.4.22 admit the same message and enter the same client-role path without the primality cost. Message 33 is admitted as well, but on a server it is rejected before any cryptography because no public-key-check callback is registered, so it carries no comparable cost. Builds that define WOLFSSH_NO_DH_GEX_SHA256 - implied by WOLFSSH_NO_DH or NO_SHA256 - do not compile in the vulnerable path and are unaffected.
Know when Wolfssh gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/AU:Y
Remote unauthenticated attacker (AV:N/PR:N/UI:N) with a trivial message sequence (AC:L); impact is bounded per-connection CPU consumption so A:L with no confidentiality or integrity effect.
Primary rating from Vendor (wolfSSL).
CVSS VectorVendor: wolfSSL
DescriptionCVE.org
src/internal.c in wolfSSL wolfSSH through 1.5.0 admits the server-to-client Diffie-Hellman group exchange messages SSH_MSG_KEX_DH_GEX_GROUP (31) and SSH_MSG_KEX_DH_GEX_REPLY (33) when a server receives them from an unauthenticated client. IsMessageAllowedServer() applies no direction check to the key exchange message range: when the peer is keying and no particular message is expected, which is the state a server is in for the whole window after it processes the client's KEXINIT because nothing sets handshake->expectMsgId there, the function falls out of its expectation branch without a verdict and reaches a numeric bound that admits every message id from 30 through 34. A client that negotiates diffie-hellman-group-exchange-sha256 and then sends message 31 makes the server run the client-side handler DoKexDhGexGroup(), which validates the attacker-supplied group with two 8-round Miller-Rabin primality tests, one on p and one on (p-1)/2, on a value of up to 8192 bits. The handler then returns success: the server stores the attacker's prime and generator, generates a Diffie-Hellman key pair in the attacker's group, and sends the client-role message SSH_MSG_KEX_DH_GEX_INIT (32) back to the attacker. Published RFC 3526 safe primes are the worst-case input and cost the attacker nothing to obtain. The primality validation was added in 1.5.0; versions from 1.2.0 through 1.4.22 admit the same message and enter the same client-role path without the primality cost. Message 33 is admitted as well, but on a server it is rejected before any cryptography because no public key check callback is registered, so it carries no comparable cost. Builds that define WOLFSSH_NO_DH_GEX_SHA256, which is implied by WOLFSSH_NO_DH or NO_SHA256, are unaffected.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Related Vulnerabilities in wolfSSH Authentication and Protocol Flaws
View all 5WolfSSH v1.4.7 was discovered to contain an integer overflow via the function wolfSSH_SFTP_RecvRMDIR. Rated critical sev
Improper authentication handling in the wolfSSH key-exchange state machine (versions 1.4.21 and earlier) allows an attac
Authentication bypass in wolfSSH 1.4.20 and earlier clients allows a malicious or man-in-the-middle SSH server to skip p
A vulnerability was found in wolfSSH's server-side state machine before versions 1.4.17. Rated critical severity (CVSS 9
A heap buffer over-read vulnerability exists in the wolfSSH_CleanPath() function in wolfSSH. An authenticated remote att
Out-of-bounds read in wolfSSHd on Windows allows authenticated users to leak adjacent stack memory via malformed termina
The wolfSSH SFTP server component contains a stack-based out-of-bounds write (CWE-787) that can be triggered by an authe
EUVD-2026-94165
GHSA-39q2-5h5r-39p7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB