MediumGHSA-6cqp-g7gg-8hr5CVE-2026-56746

Netty: Security Control Bypass via CORS Short-Circuit Failure

Published 22 Jul 2026 · Updated 10 Sept 2026

Is your project on an affected io.netty:netty-codec-http?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=4.2.0.Final <4.2.16.Final
Fixed in
4.2.16.Final
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=io.netty:netty-codec-http -DdepVersion=4.2.16.Final -DforceVersion=true
Affected
<4.1.136.Final
Fixed in
4.1.136.Final
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=io.netty:netty-codec-http -DdepVersion=4.1.136.Final -DforceVersion=true

Details

Summary

Netty's CorsHandler provides a shortCircuit() configuration designed to reject unauthorized cross-origin requests immediately, acting as a security control before requests reach the application. However, due to a logical operator error in the origin evaluation process, this protection can be entirely bypassed. An attacker can bypass the short-circuit mechanism by sending a request with an Origin: null header. This failure forwards unauthorized requests to the backend application, bypassing intended access controls.

Details

In io.netty.handler.codec.http.cors.CorsHandler#channelRead, the short-circuit logic relies on the configuration returned by getForOrigin(origin) to determine if an origin is authorized. If getForOrigin returns a configuration object, the short-circuit check (!(origin == null || config != null)) is bypassed, and the request proceeds to the backend.

The vulnerability is located in the getForOrigin method:

            if (corsConfig.isNullOriginAllowed() || NULL_ORIGIN.equals(requestOrigin)) {
                return corsConfig;
            }

If an attacker sends Origin: null, NULL_ORIGIN.equals(requestOrigin) evaluates to true. The method returns the configuration object regardless of whether isNullOriginAllowed() was configured by the developer. The short-circuit is bypassed.

Impact

Applications relying on CorsHandler's short-circuit feature to prevent unauthorized cross-origin requests from reaching their backend logic are completely exposed. The framework fails to enforce the developer's intended access controls, allowing unauthorized requests to be processed.

Is GHSA-6cqp-g7gg-8hr5 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected io.netty:netty-codec-http, and gives you the command that fixes it.

More advisories for io.netty:netty-codec-http

  • MediumCVE-2026-59903Netty Vulnerable to Cache Poisoning and Information Disclosure via CORS Vary Header Overwrite · 17 Aug 2026
  • MediumCVE-2026-59921Netty: CRLF Injection via Multipart Filename in Netty HttpPostRequestEncoder · 22 Jul 2026
  • MediumCVE-2026-59899Netty: [HttpContentEncoder] Unbounded Per-Connection Queue Growth via HTTP/1.1 Pipelining Leads to Denial of Service · 22 Jul 2026
  • MediumCVE-2026-59898Netty: WebSockets V07/V08 handshaker missing Connection/Upgrade validation · 22 Jul 2026
  • HighCVE-2026-56745Netty: [SpdyHttpDecoder] ByteBuf Reference Leak on RST_STREAM Leads to Native Memory Exhaustion · 22 Jul 2026
  • HighCVE-2026-55833Netty SPDY zlib header block continues decoded expansion after maxHeaderSize truncation · 22 Jul 2026
All 24 advisories for io.netty:netty-codec-http

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.