CVE-2026-59903: Netty Codec HTTP Vulnerable to Cache Poisoning and Information Disclosure
Summary
CVE-2026-59903: Netty Vulnerable to Cache Poisoning and Information Disclosure via CORS Vary Header Overwrite. Affects io.netty:netty-codec-http across 2 version ranges.
< 4.1.137.Final
>= 4.2.0.Final, < 4.2.17.Final
Fixed in 4.1.137.Final or 4.2.17.Final, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Netty is a popular asynchronous event-driven network application framework that enables quick and efficient development of network applications such as protocol servers and clients. The 'netty-codec-http' package is a crucial component that handles HTTP protocol encoding and decoding. It is widely used in web applications to manage HTTP requests and responses. However, a vulnerability has been identified in the CorsHandler, which can lead to serious security issues when improperly configured.
Vulnerability Detail
The vulnerability arises from the 'CorsHandler' in the 'netty-codec-http' package, which overwrites existing 'Vary' headers in HTTP responses. This behavior allows for cache poisoning, where an attacker can manipulate the caching mechanism of intermediate proxies or CDNs. By replacing critical 'Vary' headers set by backend applications (such as 'Vary: Authorization'), the CorsHandler causes these caches to ignore user-specific contexts, potentially exposing sensitive data to unauthorized users. This vulnerability affects any Netty-based web application that relies on the CorsHandler and uses custom Vary headers for caching authenticated responses.
How To Fix
Latest published version: 5.0.0.Alpha2 as of 22 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 4.1.137.Final4.1.137.Final -
>= 4.2.0.Final, < 4.2.17.Final4.2.17.Final
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, you can manually manage the Vary headers in your application to ensure that critical headers are preserved. For example, you can implement a custom handler that sets the Vary header without overwriting existing values:
public class CustomCorsHandler extends CorsHandler {
@Override
protected void setVaryHeader(final HttpResponse response) {
// Preserve existing Vary headers
String existingVary = response.headers().get(HttpHeaderNames.VARY);
if (existingVary != null) {
response.headers().set(HttpHeaderNames.VARY, existingVary + ", " + HttpHeaderNames.ORIGIN);
} else {
response.headers().set(HttpHeaderNames.VARY, HttpHeaderNames.ORIGIN);
}
}
}
Conclusion
The CVE-2026-59903 vulnerability in the Netty 'netty-codec-http' package poses a significant risk to web applications that utilize the CorsHandler. It is crucial to update to the patched versions to mitigate the risk of cache poisoning and information disclosure. Implementing workarounds can provide temporary relief, but updating is the best long-term solution.
See every vulnerability recorded for io.netty:netty-codec-http →
FAQ
CVE-2026-59903 is a vulnerability in the Netty 'netty-codec-http' package that allows for cache poisoning and information disclosure due to improper handling of Vary headers.
If your application uses the CorsHandler and sets its own Vary headers, this vulnerability can lead to unauthorized access to sensitive data cached by proxies or CDNs.
Versions of 'netty-codec-http' prior to 4.2.17.Final and 4.1.137.Final are affected by this vulnerability.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
The CVSS score of this vulnerability is 6.5, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for io.netty:netty-codec-http.