GHSA-8c42-7qj2-3j46: Medium severity maven/io.netty:netty-codec-http vulnerability

Published Aug 17, 2026
·
Updated

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.

Affected Software

2 affected componentsFixes available
maven/io.netty:netty-codec-http<=4.1.136.Final
4.1.137.Final
maven/io.netty:netty-codec-http>=4.2.0.Final<=4.2.16.Final
4.2.17.Final

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/io.netty:netty-codec-http to a version that resolves this vulnerability.

    Fixed in 4.1.137.Final
  2. Upgrade

    Upgrade maven/io.netty:netty-codec-http to a version that resolves this vulnerability.

    Fixed in 4.2.17.Final
  3. Configuration

    Modify/override CorsHandler behavior so setVaryHeader does not call response.headers().set("Vary","origin") (which overwrites any existing backend Vary headers like Vary: Authorization or Vary: Cookie). Instead, append/merge the origin token into the existing Vary header value so intermediate caches continue to vary by the backend’s user/auth-related contexts.

    io.netty.handler.codec.http.cors.CorsHandler Vary header handling (setVaryHeader) = Preserve existing Vary values instead of overwriting with Vary: origin

Event History

Aug 17, 2026
Advisory Published
via GitHub·06:24 PM
Data Sourced
via GitHub·06:24 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-8c42-7qj2-3j46?

The severity of GHSA-8c42-7qj2-3j46 is rated as medium with a score of 6.5.

2

What risks are associated with GHSA-8c42-7qj2-3j46?

GHSA-8c42-7qj2-3j46 poses risks such as cache poisoning and sensitive information disclosure due to the `CorsHandler` overwriting existing Vary headers.

3

How do I fix GHSA-8c42-7qj2-3j46?

To fix GHSA-8c42-7qj2-3j46, update to the latest version of the Netty library that addresses this issue.

4

What software is affected by GHSA-8c42-7qj2-3j46?

The affected software includes the maven/io.netty:netty-codec-http library.

5

What is the cause of the vulnerability in GHSA-8c42-7qj2-3j46?

The vulnerability in GHSA-8c42-7qj2-3j46 is caused by the `CorsHandler#setVaryHeader` method which silently overwrites existing Vary headers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203