CVE-2026-83742 (GCVE-0-2026-83742)
Vulnerability from cvelistv5
Published
2026-10-07 02:41
Modified
2026-10-07 11:30
CWE
  • CWE-191 - Integer Underflow (Wrap or Wraparound)
  • CWE-121 - Stack-based Buffer Overflow
  • CWE-193 - Off-by-one Error
Summary
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.
Impacted products
Vendor Product Version
wolfSSL Inc. wolfSSH Version: 1.4.11   ≤ 1.5.0
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-83742",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-07T11:30:20.098721Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-07T11:30:28.937Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "wolfSSH",
          "programFiles": [
            "src/port.c",
            "src/ssh.c"
          ],
          "repo": "https://github.com/wolfSSL/wolfssh",
          "vendor": "wolfSSL Inc.",
          "versions": [
            {
              "changes": [
                {
                  "at": "1.6.0",
                  "status": "unaffected"
                }
              ],
              "lessThanOrEqual": "1.5.0",
              "status": "affected",
              "version": "1.4.11",
              "versionType": "semver"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "reporter",
          "value": "Asif Nadaf \u003cpostasif@protonmail.com\u003e, Independent Security Researcher"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Unsigned integer underflow in \u003ccode\u003ewstrncat()\u003c/code\u003e in \u003ccode\u003esrc/port.c\u003c/code\u003e 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. \u003ccode\u003ewolfSSH_RealPath()\u003c/code\u003e in \u003ccode\u003esrc/ssh.c\u003c/code\u003e appends each path component with a remaining-size bound (\u003ccode\u003eoutSz - curSz\u003c/code\u003e) rather than the full destination size, so once the accumulated path reaches half the output buffer the \u003ccode\u003esize_t\u003c/code\u003e computation \u003ccode\u003en - strlen(s1) - 1\u003c/code\u003e wraps to near \u003ccode\u003eSIZE_MAX\u003c/code\u003e. The \u003ccode\u003estrncat()\u003c/code\u003e 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\u0027s 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 \u003ccode\u003ewolfSSH_RealPath()\u003c/code\u003e with an output buffer smaller than the input path are additionally exposed to an unbounded copy, because the \u003ccode\u003eword32\u003c/code\u003e expression \u003ccode\u003eoutSz - segSz\u003c/code\u003e in that length check also wraps."
            }
          ],
          "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\u0027s 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."
        }
      ],
      "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"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NO",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "attackVector": "NETWORK",
            "baseScore": 5.3,
            "baseSeverity": "MEDIUM",
            "exploitMaturity": "NOT_DEFINED",
            "privilegesRequired": "LOW",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "subIntegrityImpact": "NONE",
            "userInteraction": "NONE",
            "valueDensity": "NOT_DEFINED",
            "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",
            "version": "4.0",
            "vulnAvailabilityImpact": "LOW",
            "vulnConfidentialityImpact": "NONE",
            "vulnIntegrityImpact": "LOW",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-191",
              "description": "CWE-191 Integer Underflow (Wrap or Wraparound)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-121",
              "description": "CWE-121 Stack-based Buffer Overflow",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-193",
              "description": "CWE-193 Off-by-one Error",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-07T02:41:48.911Z",
        "orgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27",
        "shortName": "wolfSSL"
      },
      "references": [
        {
          "name": "Fix PR #1084",
          "tags": [
            "patch"
          ],
          "url": "https://github.com/wolfSSL/wolfssh/pull/1084"
        },
        {
          "name": "Fix commit 822e4464 (guard the free space calculation in wstrncat)",
          "tags": [
            "patch"
          ],
          "url": "https://github.com/wolfSSL/wolfssh/commit/822e4464560b467580ea37a2fc03b0988d88b71f"
        },
        {
          "name": "Fix commit 513e52b1 (bounded scan replacing strlen in wstrncat)",
          "tags": [
            "patch"
          ],
          "url": "https://github.com/wolfSSL/wolfssh/commit/513e52b18927a4e3f7cf17ecaf107958e56139de"
        },
        {
          "name": "Hardening commit fbc7cd88 (wolfSSH_RealPath length check and append bounds)",
          "tags": [
            "patch"
          ],
          "url": "https://github.com/wolfSSL/wolfssh/commit/fbc7cd88a23b59a45a584020a4c7242d9bd70f35"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "wstrncat() unsigned integer underflow leads to an off-by-one null write in wolfSSH on non-Windows platforms",
      "x_generator": {
        "engine": "Vulnogram 1.0.5"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27",
    "assignerShortName": "wolfSSL",
    "cveId": "CVE-2026-83742",
    "datePublished": "2026-10-07T02:41:48.911Z",
    "dateReserved": "2026-08-31T22:49:43.798Z",
    "dateUpdated": "2026-10-07T11:30:28.937Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "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\u0027s 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 \u003ccode\u003ewstrncat()\u003c/code\u003e in \u003ccode\u003esrc/port.c\u003c/code\u003e 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. \u003ccode\u003ewolfSSH_RealPath()\u003c/code\u003e in \u003ccode\u003esrc/ssh.c\u003c/code\u003e appends each path component with a remaining-size bound (\u003ccode\u003eoutSz - curSz\u003c/code\u003e) rather than the full destination size, so once the accumulated path reaches half the output buffer the \u003ccode\u003esize_t\u003c/code\u003e computation \u003ccode\u003en - strlen(s1) - 1\u003c/code\u003e wraps to near \u003ccode\u003eSIZE_MAX\u003c/code\u003e. The \u003ccode\u003estrncat()\u003c/code\u003e 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\u0027s 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 \u003ccode\u003ewolfSSH_RealPath()\u003c/code\u003e with an output buffer smaller than the input path are additionally exposed to an unbounded copy, because the \u003ccode\u003eword32\u003c/code\u003e expression \u003ccode\u003eoutSz - segSz\u003c/code\u003e 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 \u003cpostasif@protonmail.com\u003e, Independent Security Researcher\", \"type\": \"reporter\"}], \"source\": {\"discovery\": \"EXTERNAL\"}, \"x_generator\": {\"engine\": \"Vulnogram 1.0.5\"}}, \"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-83742\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-07T11:30:20.098721Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-07T11:30:25.337Z\"}}]}",
      "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-07T11:30:28.937Z\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…