CVE-2026-59903: Netty: Cache Poisoning and Information Disclosure via CORS Vary Header Overwrite
Summary Netty's CorsHandler silently overwrites existing Vary headers, enabling cache poisoning and sensitive information disclosure.
Details io.netty.handler.codec.http.cors.CorsHandler#setVaryHeader overwrites any existing Vary headers set by backend applications.
java private static void setVaryHeader(final HttpResponse response) { response.headers().set(HttpHeaderNames.VARY, HttpHeaderNames.ORIGIN); }
Because set() replaces all existing values for the header, if a backend application sets a Vary header (such as Vary: Authorization or Vary: Cookie) to ensure that intermediate caches (like CDNs) cache responses separately per user, the CorsHandler will overwrite it with Vary: origin. This causes the caching proxy to ignore the authorization context and cache the response based solely on the URL and Origin, allowing an attacker to retrieve another user's cached sensitive data.
Impact This is a Cache Poisoning vulnerability that leads to Information Disclosure. It impacts any Netty-based web application that uses the CorsHandler, sets its own Vary headers to manage caching of authenticated or user-specific responses (e.g., Vary: Authorization), and is deployed behind a caching proxy or CDN. The end-users of these applications are impacted, as their sensitive data may be leaked to unauthorized actors.
Other sources
Netty is an asynchronous, event-driven network application framework. Prior to 4.1.137.Final and 4.2.17.Final, io.netty.handler.codec.http.cors.CorsHandler setVaryHeader replaces application Vary headers such as Authorization or Cookie with Origin, allowing a caching proxy or CDN to reuse authenticated responses across users and disclose sensitive information. This issue is fixed in versions 4.1.137.Final and 4.2.17.Final.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/io.netty:netty-codec-httpto a version that resolves this vulnerability.Fixed in 4.1.137.Final - Upgrade
Upgrade
maven/io.netty:netty-codec-httpto a version that resolves this vulnerability.Fixed in 4.2.17.Final - Upgrade
Upgrade
io.netty.handler.codec.http.cors.CorsHandlerto a version that resolves this vulnerability.Fixed in 4.1.137.Final - Upgrade
Upgrade
io.netty.handler.codec.http.cors.CorsHandlerto a version that resolves this vulnerability.Fixed in 4.2.17.Final
Event History
Frequently Asked Questions
What is the severity of CVE-2026-59903?
The severity of CVE-2026-59903 is classified as medium with a score of 6.5.
What type of vulnerability is CVE-2026-59903?
CVE-2026-59903 is a cache poisoning and information disclosure vulnerability caused by CorsHandler's handling of Vary headers.
How does CVE-2026-59903 impact applications using Netty?
CVE-2026-59903 can lead to cache poisoning and the leakage of sensitive information due to the overwrite of existing Vary headers.
How do I mitigate CVE-2026-59903 in my application?
To mitigate CVE-2026-59903, ensure that the existing Vary headers are preserved by properly configuring the CorsHandler.
Is CVE-2026-59903 present in all versions of Netty?
CVE-2026-59903 affects specific versions of Netty, particularly any that utilize the `CorsHandler` functionality without adequate safeguards.