Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to wolfSSH SFTP service
-
ExploitSend crafted long SFTP realpath
-
ExecutionTrigger size_t underflow in wstrncat()
-
ImpactWrite null byte past stack buffer, crash process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
|
| Exploitation Conditions | Requires (1) a valid authenticated SSH session (PR:L) against a wolfSSH server built with the SFTP subsystem, (2) a non-Windows platform - the description explicitly scopes the flaw to non-Windows builds - and (3) wolfSSH version v1.4.11 through v1.5.0. The trigger is a crafted SFTP path processed by wolfSSH_RealPath() whose accumulated length reaches about half the output buffer so the n - strlen(s1) - 1 computation underflows; the single-byte overflow only occurs when a path component exactly fills the remaining buffer. Limiting factors: authentication is mandatory (no anonymous/pre-auth path), Windows deployments are unaffected, and the impact is confined to one null byte causing a crash - not arbitrary write or code execution. A separate, more severe unbounded-copy condition exists only for third-party applications that call the public wolfSSH_RealPath() API with an output buffer smaller than the input path. |
| Impact | This is a genuine but modest-priority issue, best characterized as a single-byte stack overflow leading to denial of service rather than code execution. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L) scores 5.3 (Medium) and the signals are internally consistent: network-reachable but requiring prior authentication (PR:L), with only Low integrity and Low availability impact and no confidentiality impact - matching a description that explicitly limits the overflow to one out-of-bounds null byte that may corrupt an adjacent stack value and crash the process. There is no EPSS score, no CISA KEV listing, and no public exploit code in the provided data, so there is no evidence of active or imminent exploitation; the realistic worst case is a crash of the SSH/SFTP server by an already-authenticated user. CWE-191 (integer underflow) is accurately reflected - the size_t computation n - strlen(s1) - 1 wrapping to near SIZE_MAX is the root cause. One caveat to verify: the description also warns that applications calling the public wolfSSH_RealPath() with an undersized output buffer face an *unbounded* copy (the word32 outSz - segSz also wraps), which would be more severe than the core SFTP path; that secondary exposure depends on third-party integration code and is not captured by the base CVSS. Overall this is a legitimate fix-in-maintenance-window issue, not an emergency. |
| Exploit ScenarioDerived | An attacker who already holds valid SSH credentials on a non-Windows wolfSSH server opens an SFTP session and sends a crafted realpath request whose accumulated path length reaches roughly half the output buffer, triggering the size_t underflow in wstrncat() so a final component writes one null byte past the end of a stack buffer. This corrupts an adjacent stack value and crashes the wolfSSH process, denying service to other users. No public proof-of-concept is identified in the provided data, and exploitation yields a crash rather than code execution. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
An authenticated remote attacker with a valid SSH session can trigger a one-byte out-of-bounds stack write in wolfSSH v1.4.11 through v1.5.0 on non-Windows platforms by sending a crafted SFTP path, which can corrupt an adjacent stack value and crash the server process. The flaw is an unsigned integer underflow (CWE-191) in which the pointer/length math in wolfSSH_RealPath() and wstrncat() wraps once the accumulated path reaches roughly half the output buffer, causing a terminating null byte to be written one byte past the end of the stack buffer. The impact is limited to a single-byte corruption causing denial of service rather than arbitrary write or code execution, and no public exploit has been identified at time of analysis; a separate, more severe unbounded-copy condition exists only for third-party applications that call the public wolfSSH_RealPath() API with an output buffer smaller than the input path.
RemediationAI
Apply the upstream fix: upstream fix available (PR/commit); released patched version not independently confirmed. The relevant changes are in https://github.com/wolfSSL/wolfssh/pull/1084 and the associated commits https://github.com/wolfSSL/wolfssh/commit/822e4464560b467580ea37a2fc03b0988d88b71f, https://github.com/wolfSSL/wolfssh/commit/513e52b18927a4e3f7cf17ecaf107958e56139de, and https://github.com/wolfSSL/wolfssh/commit/fbc7cd88a23b59a45a584020a4c7242d9bd70f35; because no patched release tag is confirmed in the available data, rebuild wolfSSH from these commits or later rather than assuming the latest published tarball is fixed. If patching immediately is not possible, compensating controls with trade-offs include disabling the SFTP subsystem in the wolfSSH build or at the server configuration level (removes the entire trigger surface but also removes legitimate file-transfer functionality), restricting SSH access to tightly scoped, fully trusted accounts since exploitation requires a valid authenticated session per the CVSS vector PR:L (reduces but does not eliminate exposure because any legitimate account can craft the path), and ensuring that any in-house code calling the public wolfSSH_RealPath() API always supplies an output buffer strictly larger than the input path plus one byte for the terminator (addresses the separate unbounded-copy condition but is a caller-side discipline that must be audited across every call site). No public exploit has been identified at time of analysis, so emergency out-of-band action is not indicated, but patching should be scheduled in the normal maintenance window.
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 CWE-191, unsigned integer underflow, in wolfSSH's portability string helpers. In src/port.c, wstrncat() derived its remaining-space bound as size_t freeSpace = n - strlen(s1) - 1 without validating that n was actually larger than strlen(s1); when it was not, the subtraction wrapped to near SIZE_MAX. The caller wolfSSH_RealPath() in src/ssh.c amplified the problem by passing a per-component remaining size (outSz - curSz) instead of the full destination size, so once the accumulated path length approached half the output buffer, the wrapped bound made the underlying strncat() effectively unbounded. The copied path data itself stayed inside the buffer because of the caller's separate length check, so only the terminating null was written one byte past the end of the stack buffer, potentially corrupting an adjacent stack variable. A second underflow exists in the public wolfSSH_RealPath() entry point: the word32 expression outSz - segSz in its own length check wraps when the caller supplies an output buffer smaller than the input path, producing an unbounded copy. The upstream fix in PR 1084 rewrites wstrncat() to measure s1 with a bounded loop, return NULL when s1_len >= n, and compute freeSpace = n - s1_len - 1 only after that guard, while wolfSSH_RealPath() now passes the full buffer size and converts a NULL return into WS_INVALID_PATH_E. The same PR also hardens adjacent code paths, including agent.c passphrase handling (heap allocation with WOLFSSH_MAX_PASSPHRASE_SZ 256 limit and len/keyBlobSz checks), certman.c null/length validation, and wolfscp.c file-size parsing.
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:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/AU:N
Network-reachable SFTP but requires a valid account (PR:L); attacker fully controls the path so AC:L; impact limited to one-byte stack corruption (I:L) and a possible crash (A:L), no data disclosure (C:N).
Primary rating from Vendor (wolfSSL).
CVSS VectorVendor: wolfSSL
DescriptionCVE.org
Unsigned integer underflow in wstrncat() in src/port.c in wolfSSL wolfSSH from v1.4.11 through v1.5.0 on non-Windows platforms allows an authenticated remote attacker to write one out-of-bounds null byte past the end of a stack buffer by sending a crafted SFTP path. wolfSSH_RealPath() in src/ssh.c appends each path component with a remaining-size bound (outSz - curSz) rather than the full destination size, so once the accumulated path reaches half the output buffer the size_t computation n - strlen(s1) - 1 wraps to near SIZE_MAX. The strncat() call is then effectively unbounded and copies the whole component; when that component exactly fills the remainder of the buffer, its terminating null is written one byte past the end. The caller's own length check keeps the copied data inside the buffer, so the overflow is limited to that single null byte, which may corrupt an adjacent stack value and crash the process. Applications that call the public wolfSSH_RealPath() with an output buffer smaller than the input path are additionally exposed to an unbounded copy, because the word32 expression outSz - segSz in that length check also wraps.
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
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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-94164
GHSA-4ff8-whrv-3wcm
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB