/

CVE-2026-81535

Severity:

CRITICAL RISK

(9.1)

Missing Authorization (CWE-862) in wolfSSH Forwarding

CVE-2026-81535

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862, CWE-863

Impact:

Unauthorized Network Forwarding and Denial of Service

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

wolfSSH forwarding channels may be accepted without applying the configured authorization policy or verifying that the requested forwarding was previously registered. A malicious SSH peer could abuse this behavior to create unauthorized forwarding channels and potentially cause excessive memory allocation or denial of service when forwarding support is enabled.

wolfSSH forwarding channels may be accepted without applying the configured authorization policy or verifying that the requested forwarding was previously registered. A malicious SSH peer could abuse this behavior to create unauthorized forwarding channels and potentially cause excessive memory allocation or denial of service when forwarding support is enabled.

Affected context

The issue occurs in wolfSSH deployments built with forwarding support enabled. It affects channel-open processing when forwarded-tcpip channels are admitted without the same authorization checks applied to other forwarding channel types, and when clients do not verify that requested forwarding matches an earlier tcpip-forward registration.

The issue occurs in wolfSSH deployments built with forwarding support enabled. It affects channel-open processing when forwarded-tcpip channels are admitted without the same authorization checks applied to other forwarding channel types, and when clients do not verify that requested forwarding matches an earlier tcpip-forward registration.

Exploit preconditions

  • Attack surface: SSH channel-opening and TCP forwarding functionality
  • Required access: Ability to connect as, or act as, an SSH peer accepted by the endpoint
  • Trigger point: Processing a forwarded-tcpip channel-open request
  • Configuration condition: Forwarding support must be enabled
  • Why exploitation is possible: The channel type can bypass the forwarding policy callback, may not be limited in quantity, and client-side requests may not be checked against registered forwarding destinations
  • Attack surface: SSH channel-opening and TCP forwarding functionality
  • Required access: Ability to connect as, or act as, an SSH peer accepted by the endpoint
  • Trigger point: Processing a forwarded-tcpip channel-open request
  • Configuration condition: Forwarding support must be enabled
  • Why exploitation is possible: The channel type can bypass the forwarding policy callback, may not be limited in quantity, and client-side requests may not be checked against registered forwarding destinations

Why this happens

The underlying bug is an authorization-control gap in protocol state handling. The channel-open implementation applies the forwarding policy callback to direct-tcpip channels but does not consistently enforce equivalent authorization for forwarded-tcpip channels. In addition, the client does not bind incoming forwarding channels to the addresses and ports authorized by a prior forwarding request, mapping to CWE-862: Missing Authorization and CWE-863: Incorrect Authorization.

The underlying bug is an authorization-control gap in protocol state handling. The channel-open implementation applies the forwarding policy callback to direct-tcpip channels but does not consistently enforce equivalent authorization for forwarded-tcpip channels. In addition, the client does not bind incoming forwarding channels to the addresses and ports authorized by a prior forwarding request, mapping to CWE-862: Missing Authorization and CWE-863: Incorrect Authorization.

Potential impact

  • An attacker may establish forwarding channels that the application did not authorize
  • An endpoint could allocate excessive per-channel buffers and experience resource exhaustion
  • A service may suffer denial of service through unbounded or insufficiently constrained channel creation
  • Network access may be extended to destinations or ports outside the intended forwarding policy
  • Security monitoring and network segmentation assumptions could be bypassed
  • An attacker may establish forwarding channels that the application did not authorize
  • An endpoint could allocate excessive per-channel buffers and experience resource exhaustion
  • A service may suffer denial of service through unbounded or insufficiently constrained channel creation
  • Network access may be extended to destinations or ports outside the intended forwarding policy
  • Security monitoring and network segmentation assumptions could be bypassed

General mitigation guidance

Mitigation generally focuses on enforcing authorization consistently across every forwarding channel type and binding protocol actions to explicit application policy.

Common defensive patterns include:

  • Applying the forwarding policy callback to all relevant channel-open requests
  • Verifying incoming forwarding channels against the exact address and port registrations maintained by the client
  • Enforcing bounded limits on concurrent channels, buffers, and forwarding resources
  • Disabling forwarding when an application does not require it
  • Running SSH services with least-privilege identities and narrowly scoped network access
  • Treating peer-supplied forwarding parameters as untrusted until authorization and state checks succeed

Mitigation generally focuses on enforcing authorization consistently across every forwarding channel type and binding protocol actions to explicit application policy.

Common defensive patterns include:

  • Applying the forwarding policy callback to all relevant channel-open requests
  • Verifying incoming forwarding channels against the exact address and port registrations maintained by the client
  • Enforcing bounded limits on concurrent channels, buffers, and forwarding resources
  • Disabling forwarding when an application does not require it
  • Running SSH services with least-privilege identities and narrowly scoped network access
  • Treating peer-supplied forwarding parameters as untrusted until authorization and state checks succeed

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and code review of channel-dispatch paths for authorization checks applied inconsistently by channel type
  • Review of state validation connecting channel-open requests to previously registered forwarding requests
  • Tests that submit unauthorized forwarded-tcpip requests and verify rejection
  • Policy checks for deployments that enable forwarding without explicit resource limits
  • Runtime monitoring for unexpected forwarding destinations, unusual channel counts, rapid channel creation, or abnormal buffer growth
  • Automated security review tools that flag missing authorization and unchecked resource allocation paths

Organizations can identify this class of issue through:

  • Static analysis and code review of channel-dispatch paths for authorization checks applied inconsistently by channel type
  • Review of state validation connecting channel-open requests to previously registered forwarding requests
  • Tests that submit unauthorized forwarded-tcpip requests and verify rejection
  • Policy checks for deployments that enable forwarding without explicit resource limits
  • Runtime monitoring for unexpected forwarding destinations, unusual channel counts, rapid channel creation, or abnormal buffer growth
  • Automated security review tools that flag missing authorization and unchecked resource allocation paths

Sources

SourceLink
github.comgithub.com/wolfSSL/wolfssh/commit/616eb681e70759c30c3ba158f2b18d7bd954def8
github.comgithub.com/wolfSSL/wolfssh/commit/79a7f299337a28aa561409688a268d0efe6e295c
github.comgithub.com/wolfSSL/wolfssh/commit/e396a0a4b6b367f10270287446a4be0071742b5c

Frequently asked

questions

Yes, the relevant actions are performed through SSH protocol interactions, but exploitation depends on the attacker being accepted as an SSH peer and on forwarding support being enabled.

The attacker generally needs the ability to establish an SSH connection that reaches channel-opening functionality. The exact requirement depends on authentication, trust, and application-level access controls.

Apply authorization checks uniformly to every forwarding channel type, verify channels against registered forwarding state, and enforce strict limits on channels and allocated resources.

Model forwarding as an explicitly authorized capability, reject requests that do not match policy or prior registration, test every channel type independently, and monitor forwarding activity for unexpected destinations and resource use.

Yes, the relevant actions are performed through SSH protocol interactions, but exploitation depends on the attacker being accepted as an SSH peer and on forwarding support being enabled.

The attacker generally needs the ability to establish an SSH connection that reaches channel-opening functionality. The exact requirement depends on authentication, trust, and application-level access controls.

Apply authorization checks uniformly to every forwarding channel type, verify channels against registered forwarding state, and enforce strict limits on channels and allocated resources.

Model forwarding as an explicitly authorized capability, reject requests that do not match policy or prior registration, test every channel type independently, and monitor forwarding activity for unexpected destinations and resource use.

Find out what's already
exploitable in your codebase.