/

CVE-2026-59898

Severity:

HIGH RISK

(7.5)

WebSocket Protocol Confusion (CWE-444) in Netty Framework

CVE-2026-59898

Analyzed

Vulnerability type

Category:

HTTP Request Smuggling and Protocol Confusion

CWE:

CWE-444

Impact:

HTTP Request Smuggling and Request Routing Manipulation

Severity:

HIGH RISK

(7.5)

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

A protocol-confusion vulnerability in Netty's legacy WebSocket handshakers can accept a WebSocket upgrade even when required HTTP upgrade headers are missing. An attacker may exploit this behavior to create differences between how Netty and an intervening proxy interpret the same request, enabling HTTP request smuggling or related protocol-confusion attacks.

Affected context

The issue occurs in Netty deployments that use the affected V07 or V08 WebSocket handshaker behavior and process upgrade requests through a proxy, gateway, load balancer, or other intermediary. Risk is higher when the intermediary requires standard Upgrade headers while the backend accepts a protocol switch based on an incomplete or nonstandard request.

Exploit preconditions

  • Attack surface: An HTTP-accessible Netty endpoint that supports WebSocket negotiation
  • Required access: Ability to send network requests to the endpoint, typically without privileged application access
  • Trigger point: WebSocket handshake processing by the lax V07 or V08 handshaker
  • Why exploitation is possible: The backend may switch protocols after receiving a WebSocket version indicator even when Connection: Upgrade and Upgrade: websocket headers are absent, allowing a proxy and backend to assign different meanings to the request stream

Why this happens

The underlying bug is inconsistent validation of WebSocket handshake requirements. The handshaker treats the WebSocket version header as sufficient to proceed with a protocol switch instead of requiring the complete HTTP Upgrade semantics expected by intermediaries. This creates divergent parsing and state-transition behavior between a proxy and the backend, mapping to CWE-444, Inconsistent Interpretation of HTTP Requests.

Potential impact

  • An attacker may smuggle HTTP requests past intermediary controls
  • A proxy and backend could interpret request boundaries or protocols differently
  • Access-control, routing, logging, or filtering decisions may be bypassed
  • Backend endpoints may receive unintended requests
  • Session integrity or application data confidentiality could be affected

General mitigation guidance

Mitigation generally focuses on enforcing complete and standards-aligned

WebSocket handshake validation before any protocol transition occurs.

Common defensive patterns include:

  • Require all mandatory Upgrade and Connection semantics before switching protocols
  • Reject malformed, incomplete, or unexpected WebSocket handshake combinations
  • Ensure proxies, gateways, and backends apply consistent request parsing rules
  • Disable legacy handshake paths when they are not required by the application
  • Apply least-privilege network exposure and isolate administrative or sensitive endpoints
  • Normalize or reject ambiguous requests at the earliest trusted boundary

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis and code review for WebSocket handshakes that validate version fields without validating required upgrade headers
  • Tests covering missing, duplicated, conflicting, or malformed Connection and Upgrade headers
  • Differential testing through each proxy, gateway, and backend combination to identify inconsistent protocol transitions
  • Web application firewall or gateway policies that reject incomplete WebSocket upgrade requests
  • Monitoring for unexpected protocol switches, malformed handshake patterns, and backend requests absent from proxy logs
  • Neutral automated security review tools that flag request-parsing discrepancies and protocol-confusion patterns

Sources

SourceLink
github.comgithub.com/netty/netty/releases/tag/netty-4.1.136.Final
github.comgithub.com/netty/netty/releases/tag/netty-4.2.16.Final
github.comgithub.com/netty/netty/security/advisories/GHSA-4mp9-239f-g9hg

Frequently asked

questions

It can be remotely exploitable when an attacker can send requests to an affected

Netty WebSocket endpoint, particularly when a proxy or gateway sits between the

client and backend.

Authentication is not inherently required at the protocol layer. The practical

requirement is network reachability to the vulnerable handshake endpoint, though

application-level access controls may limit exposure.

Enforce complete, standards-compliant WebSocket handshake validation and reject

requests that omit required upgrade headers before changing protocols.

Test request parsing consistently across proxies and backends, reject ambiguous

protocol transitions, avoid unnecessary legacy handshake paths, and monitor for

discrepancies between intermediary and application logs.

Find out what's already
exploitable in your codebase.