CVE-2026-59903
Netty Vulnerable to Cache Poisoning and Information Disclosure via CORS Vary Header Overwrite
Description
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.
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| io.netty » netty-codec-http | < 4.1.137.Final>= 4.2.0.Final, < 4.2.17.Final | 4.1.137.Final, 4.2.17.Final |
Blast radius
70% of the dependent artifacts (28,505) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 50,556 |
| 2 hops | 291,123 |
| 3 hops | 576,742 |
| 4 hops | 455,291 |
| 5 hops | 308,665 |
| 6 hops | 179,481 |
Most used dependents
- org.testcontainers » testcontainers4,109 usages
- io.netty » netty-all3,584 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- redis.clients » jedis2,971 usages
- org.apache.spark » spark-core2,899 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- com.android.tools.build » gradle2,197 usages
- io.vertx » vertx-core2,116 usages
- org.seleniumhq.selenium » selenium-java2,089 usages
- org.apache.zookeeper » zookeeper2,044 usages
- com.typesafe.play » play-test1,902 usages
- org.apache.hadoop » hadoop-client1,796 usages
- io.quarkus » quarkus-maven-plugin1,484 usages
- org.apache.kafka » kafka1,450 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/netty/netty/security/advisories/GHSA-8c42-7qj2-3j46
- Webhttps://github.com/netty/netty/pull/17213
- Webhttps://github.com/netty/netty/pull/17217
- Packagehttps://github.com/netty/netty
- Webhttps://github.com/netty/netty/releases/tag/netty-4.1.137.Final
- Webhttps://github.com/netty/netty/releases/tag/netty-4.2.17.Final
