{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-83742", "assignerOrgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27", "state": "PUBLISHED", "assignerShortName": "wolfSSL", "dateReserved": "2026-08-31T22:49:43.798Z", "datePublished": "2026-10-07T02:41:48.911Z", "dateUpdated": "2026-10-07T02:41:48.911Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27", "shortName": "wolfSSL", "dateUpdated": "2026-10-07T02:41:48.911Z" }, "title": "wstrncat() unsigned integer underflow leads to an off-by-one null write in wolfSSH on non-Windows platforms", "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-191", "description": "CWE-191 Integer Underflow (Wrap or Wraparound)", "type": "CWE" } ] }, { "descriptions": [ { "lang": "en", "cweId": "CWE-121", "description": "CWE-121 Stack-based Buffer Overflow", "type": "CWE" } ] }, { "descriptions": [ { "lang": "en", "cweId": "CWE-193", "description": "CWE-193 Off-by-one Error", "type": "CWE" } ] } ], "impacts": [ { "descriptions": [ { "lang": "en", "value": "Write of a single out-of-bounds null byte immediately past the end of a stack buffer in the SFTP path handlers, which may corrupt an adjacent stack value and cause the server process to misbehave or crash. Requires an authenticated SFTP session. The copied path data itself stays within the buffer, and no out-of-bounds read or information disclosure results, because the out-of-bounds null terminates the string. Applications calling the public wolfSSH_RealPath() with an output buffer smaller than the input path can instead suffer an unbounded stack buffer overflow." } ] }, { "capecId": "CAPEC-100", "descriptions": [ { "lang": "en", "value": "CAPEC-100 Overflow Buffers" } ] } ], "affected": [ { "vendor": "wolfSSL Inc.", "product": "wolfSSH", "repo": "https://github.com/wolfSSL/wolfssh", "programFiles": [ "src/port.c", "src/ssh.c" ], "versions": [ { "status": "affected", "version": "1.4.11", "lessThanOrEqual": "1.5.0", "changes": [ { "at": "1.6.0", "status": "unaffected" } ], "versionType": "semver" } ], "defaultStatus": "unaffected" } ], "descriptions": [ { "lang": "en", "value": "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.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "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." } ] } ], "references": [ { "url": "https://github.com/wolfSSL/wolfssh/pull/1084", "name": "Fix PR #1084", "tags": [ "patch" ] }, { "url": "https://github.com/wolfSSL/wolfssh/commit/822e4464560b467580ea37a2fc03b0988d88b71f", "name": "Fix commit 822e4464 (guard the free space calculation in wstrncat)", "tags": [ "patch" ] }, { "url": "https://github.com/wolfSSL/wolfssh/commit/513e52b18927a4e3f7cf17ecaf107958e56139de", "name": "Fix commit 513e52b1 (bounded scan replacing strlen in wstrncat)", "tags": [ "patch" ] }, { "url": "https://github.com/wolfSSL/wolfssh/commit/fbc7cd88a23b59a45a584020a4c7242d9bd70f35", "name": "Hardening commit fbc7cd88 (wolfSSH_RealPath length check and append bounds)", "tags": [ "patch" ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV4_0": { "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "subConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "subIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NO", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED", "version": "4.0", "baseSeverity": "MEDIUM", "baseScore": 5.3, "vectorString": "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" } } ], "credits": [ { "lang": "en", "value": "Asif Nadaf , Independent Security Researcher", "type": "reporter" } ], "source": { "discovery": "EXTERNAL" }, "x_generator": { "engine": "Vulnogram 1.0.5" } } } }