Skip to main content

wolfSSH CVE-2026-83742

| EUVDEUVD-2026-94164 MEDIUM
Integer Underflow (CWE-191)
2026-10-07 wolfSSL GHSA-4ff8-whrv-3wcm
5.3
CVSS 4.0 · Vendor: wolfSSL
View

Attack ChainAIDerived

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

  1. Access
    Authenticate to wolfSSH SFTP service
  2. Exploit
    Send crafted long SFTP realpath
  3. Execution
    Trigger size_t underflow in wstrncat()
  4. Impact
    Write 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.

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

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

wolfSSH 1.4.11 ≤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 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

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

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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/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
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.3%
Top 76% exploitable
Prevalence
Low
niche embedded/IoT SSH library, far smaller footprint than OpenSSH
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
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

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.

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