/

CVE-2026-42578

Severity:

HIGH RISK

(7.5)

HTTP Header Injection in Netty HttpProxyHandler CONNECT

CVE-2026-42578

Modified

Vulnerability type

Category:

HTTP Header Injection

CWE:

CWE-113, CWE-93

Impact:

HTTP Header Injection and Potential Request Smuggling via Proxy

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Netty's HttpProxyHandler constructs HTTP CONNECT requests with header validation disabled and incorporates user-controlled outbound headers without CRLF checking.

If an attacker can influence these outbound headers, they may inject arbitrary HTTP headers into the CONNECT request sent to an upstream proxy, potentially enabling request smuggling or security policy bypass in proxied environments.

Affected context

This issue arises in applications built on Netty that:

  • Use HttpProxyHandler to establish HTTP CONNECT tunnels through a proxy server, and
  • Allow user or upstream-controlled values to be placed into outbound headers used by HttpProxyHandler.

The vulnerability is present when the handler constructs CONNECT requests with header validation disabled, meaning CRLF sequences in header values are not rejected before being sent to the proxy.

Exploit preconditions

  • Attack surface: Network applications using Netty's HttpProxyHandler to connect through an HTTP proxy.
  • Required access: Ability to influence or control values that are added to outbound headers (e.g., user input mapped into headers, upstream service data copied into headers).
  • Trigger point: Creation of the CONNECT request in newInitialMessage(), which builds headers via DefaultHttpHeadersFactory.headersFactory().withValidation(false) and appends outbound headers without CRLF validation.
  • Why exploitation is possible: With validation disabled, CRLF characters in attacker-controlled header values can terminate an existing header and start new, injected headers in the CONNECT request.

Why this happens

The root cause is the explicit disabling of HTTP header validation when constructing CONNECT requests in HttpProxyHandler while still accepting attacker-influenced header values.

By using withValidation(false) and not performing independent checks for CRLF or other delimiter characters, the implementation fails to enforce header syntax integrity.

This corresponds to CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers, where untrusted input is allowed to break header boundaries and modify the structure of the HTTP message.

Potential impact

  • Injection of arbitrary HTTP headers into the CONNECT request sent to the proxy server.
  • Potential HTTP request smuggling or desynchronization between proxy and upstream services, depending on proxy behavior.
  • Bypassing proxy-based security policies, logging controls, or access control mechanisms that rely on specific headers.
  • Confusion of downstream services by altering authentication, routing, or metadata headers.

General mitigation guidance

Effective mitigation focuses on enforcing strict header validation and reducing trust in externally influenced header values:

  • Prefer header construction paths that keep validation enabled so CRLF and other illegal characters are rejected.
  • Sanitize and normalize all user-controlled data before inserting it into HTTP headers, removing or encoding CRLF and other control characters.
  • Centralize header creation behind a safe API that validates names and values rather than allowing ad hoc string concatenation.
  • Limit which fields can be influenced by external input; avoid exposing direct control over security-relevant headers (e.g., Host, Authorization, X-Forwarded-*).
  • Apply least-privilege principles at the proxy and application layers, so injected headers have minimal ability to alter authentication or routing behavior.

How teams detect issues like this

Detection generally involves a combination of code analysis and runtime checks:

  • Use static analysis or code scanning rules to flag uses of HTTP header factories where validation is disabled (e.g., withValidation(false)), especially in paths that consume user input.
  • During code review, look for any logic that copies request parameters, cookies, or other untrusted data directly into header values without normalization.
  • Implement security tests that attempt to inject CRLF sequences into header-related inputs and monitor proxy and upstream responses for anomalous headers or request splitting.
  • Configure automated quality gates in CI/CD to block changes that introduce unvalidated header handling patterns or bypass existing sanitization utilities.

Sources

SourceLink
github.comgithub.com/netty/netty/security/advisories/GHSA-45q3-82m4-75jr
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23808
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24502
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25123
access.redhat.comaccess.redhat.com/errata/RHSA-2026:28010
access.redhat.comaccess.redhat.com/errata/RHSA-2026:36820
access.redhat.comaccess.redhat.com/errata/RHSA-2026:37390
access.redhat.comaccess.redhat.com/errata/RHSA-2026:42644
access.redhat.comaccess.redhat.com/errata/RHSA-2026:49700
access.redhat.comaccess.redhat.com/errata/RHSA-2026:49701
access.redhat.comaccess.redhat.com/errata/RHSA-2026:53644
access.redhat.comaccess.redhat.com/errata/RHSA-2026:53645
access.redhat.comaccess.redhat.com/errata/RHSA-2026:53646
access.redhat.comaccess.redhat.com/errata/RHSA-2026:54435
access.redhat.comaccess.redhat.com/errata/RHSA-2026:65126
access.redhat.comaccess.redhat.com/errata/RHSA-2026:66488
access.redhat.comaccess.redhat.com/errata/RHSA-2026:66545
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-42578
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2477226
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42578.json

Frequently asked

questions

Yes, if an external attacker can control or significantly influence the values that are mapped into the outbound headers used by HttpProxyHandler, they can potentially exploit this issue over the network.

The attacker typically needs the ability to submit data that the application later propagates into outbound headers, such as request parameters, tokens, or user-defined metadata that the server copies into header fields.

Ensure HTTP header validation remains enabled when constructing CONNECT requests and sanitize all untrusted data before placing it in headers, rejecting or safely encoding any CRLF characters or other illegal control sequences.

Standardize on safe header-building utilities that enforce syntax rules, prohibit direct concatenation of untrusted strings into HTTP headers, and add automated tests and static analysis checks to catch any reintroduction of unvalidated header handling.

Find out what's already
exploitable in your codebase.