Skip to main content

wolfSSH CVE-2026-84897

| EUVDEUVD-2026-94165 MEDIUM
Incomplete Internal State Distinction (CWE-372)
2026-10-07 wolfSSL GHSA-39q2-5h5r-39p7
6.9
CVSS 4.0 · Vendor: wolfSSL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Open unauthenticated connection to wolfSSH server
  2. Delivery
    Negotiate diffie-hellman-group-exchange-sha256 in KEXINIT
  3. Exploit
    Send message 31 with 8192-bit RFC 3526 safe prime
  4. Execution
    Server runs client-role DoKexDhGexGroup primality tests
  5. Impact
    Repeat 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

wolfSSH 1.2.0 ≤1.5.0

Affected Packages

euvd wolfssh no fix

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

Vendor (wolfSSL) PRIMARY 6.9 MEDIUM
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
vuln.today AI 5.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (wolfSSL).

CVSS VectorVendor: wolfSSL

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
niche embedded/IoT SSH server library, limited general server footprint
Data Quality
7 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy