Netty Vulnerable to 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.
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | io.netty:netty-codec-http | >= 4.2.0.Final, < 4.2.17.Final, < 4.1.137.Final | 4.2.17.Final, 4.1.137.Final |
References
- https://github.com/netty/netty/security/advisories/GHSA-8c42-7qj2-3j46
- https://github.com/netty/netty/pull/17213
- https://github.com/netty/netty/pull/17217
- https://github.com/netty/netty
- https://github.com/netty/netty/releases/tag/netty-4.1.137.Final
- https://github.com/netty/netty/releases/tag/netty-4.2.17.Final
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N- Weakness (CWE)
CWE-524- Platform
- Java / Kotlin (Maven)
- Package
io.netty:netty-codec-http- Disclosed
- 17.08.2026
- Updated
- 11.10.2026 13:20
Sources and licenses
OSV / GitHub Advisory Database - GHSA-8c42-7qj2-3j46 - CC BY 4.0
Vulnerability history: io.netty:netty-codec-http
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 24
- First → latest
- 02.2020 08.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 6
- Medium 16
- Low 1
Disclosures per year
- 2020: 1
- 2021: 2
- 2022: 2
- 2023: 0
- 2024: 1
- 2025: 2
- 2026: 16
-
Netty Vulnerable to Cache Poisoning and Information Disclosure via CORS Vary Header Overwrite this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.