GHSA-HFR2-X62W-V49H
HTTP/1 absolute-form Host mismatch is translated to HTTP/3 :authority, overriding the request-target authority
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 4.2.18.Final | io.netty:netty-codec-http3 · -1 d desde divulgación | |
| Divulgación | Publicada | GHSA-HFR2-X62W-V49H divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Netty's HTTP/1-to-HTTP/3 conversion builds the HTTP/3 `:authority` pseudo-header from the HTTP/1 `Host` header before considering the authority in an absolute-form HTTP/1 request-target.
For a request such as:
GET https://trusted.example/admin HTTP/1.1
Host: attacker.example`HttpConversionUtil.toHttp3Headers(...)` emits:
:scheme: https
:authority: attacker.example
:path: /adminThis contradicts the HTTP/1 absolute-form rule that an origin server receiving absolute-form must ignore the received Host header and use the request-target authority instead. In a Netty-based HTTP/1-to-HTTP/3 gateway or proxy pipeline, security or routing decisions made on the RFC-defined HTTP/1 target authority can disagree with the authority sent upstream over HTTP/3.
Technical Details
The vulnerable conversion path is:
- `Http3FrameToHttpObjectCodec(false)` encodes outbound HTTP/1 request objects into HTTP/3 request stream frames;
- `HttpConversionUtil.toHttp3Headers(HttpMessage, boolean)` converts an `HttpRequest` into HTTP/3 pseudo-headers.
Current source:
codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java
371: URI requestTargetUri = URI.create(request.uri());
372: out.path(toHttp3Path(requestTargetUri));
374: setHttp3Scheme(inHeaders, requestTargetUri, out);
376: // Attempt to take from HOST header before taking from the request-line
377: String host = inHeaders.getAsString(HttpHeaderNames.HOST);
378-379: if (host != null && !host.isEmpty()) setHttp3Authority(host, out);
381-382: otherwise use requestTargetUri.getAuthority()The conversion already parses the absolute request-target to derive `:scheme` and `:path`. The guard gap is specifically authority selection: a conflicting `Host` header wins even when the request-target has its own authority.
Impact
In a Netty-based HTTP/1-to-HTTP/3 gateway, proxy, or protocol bridge, a remote HTTP/1 client can send an absolute-form request-target for one authority while supplying a different Host header. A component that validates, authorizes, or routes using the RFC-defined request-target authority can make a different decision than the HTTP/3 upstream, which receives Netty's generated `:authority` from the conflicting Host header.
This can affect virtual-host routing, allow-list checks, backend selection, cache keys, URL generation, and other authority-dependent security decisions.
This report does not claim code execution, memory corruption, or availability impact. The demonstrated impact is integrity loss through authority confusion at an HTTP/1-to-HTTP/3 conversion boundary.
Suggested Fix
When converting an HTTP/1 request to HTTP/3:
- if the request-target is absolute-form and has an authority component, derive `:authority` from the request-target authority;
- only fall back to the Host header for origin-form or asterisk-form request targets, or for non-HTTP URI forms without a request-target authority;
- preserve existing userinfo stripping in `setHttp3Authority(...)`;
- add regression coverage for direct `toHttp3Headers(...)` and `Http3FrameToHttpObjectCodec(false)`.
The attached patched-control diff demonstrates the minimal behavior change:
`evidence/minimal-fail-closed-patched-control.diff`
Affected Package/Versions
`io.netty:netty-codec-http3`
Confirmed affected:
- current `4.2` branch at `7bae566a93e69409697fe57fa807910ba5c9720e`
- `4.2.15.Final` at `a41f7b289ce1d697c50846f3ade3983e22b2ed40`
- `4.2.2.Final` at `660edeaefad4a4cedbd61584e8f668ad2d89f0b8`
Suggested affected range:
- `>= 4.2.2.Final, <= 4.2.15.Final`
`codec-http3` was not present in the checked `4.2.0.Final` or `4.1.135.Final` trees, so this report does not claim those versions.
References
- Netty security policy: https://github.com/netty/netty/security/policy
- RFC 9112 absolute-form and Host authority rules: https://datatracker.ietf.org/doc/html/rfc9112#section-3.2
- RFC 9114 malformed request handling: https://datatracker.ietf.org/doc/html/rfc9114#section-4.1.2
- RFC 9114 request pseudo-header fields: https://datatracker.ietf.org/doc/html/rfc9114#section-4.3.1
- RFC 9110 Host and authority semantics: https://datatracker.ietf.org/doc/html/rfc9110#section-7.2
- Guzzle PSR-7 host confusion advisory: https://github.com/guzzle/psr7/security/advisories/GHSA-34xg-wgjx-8xph
- Koa Host header injection advisory: https://github.com/advisories/GHSA-7gcc-r8m5-44qm
CWE and CVSS
Suggested CWEs:
- `CWE-20`: Improper Input Validation
- `CWE-436`: Interpretation Conflict
- `CWE-444`: Inconsistent Interpretation of HTTP Requests
Suggested CVSS v3.1:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NSuggested severity: High, score 7.5.
Rationale: the issue is network-triggerable by an unauthenticated HTTP/1 client when Netty is used in an HTTP/1-to-HTTP/3 gateway/proxy path, requires low complexity, and can cause upstream authority-dependent security decisions to be made on a different host. Confidentiality and availability are not claimed.
Duplicate Boundary
This is distinct from visible Netty reports:
- `GHSA-cg2g-fxr4-mg8m` covers the HTTP/2 conversion code and `io.netty:netty-codec-http2`.
- `GHSA-h235-6gmg-jv93` covers HTTP/3-to-HTTP/1 inbound downgrade of an absolute-form `:path`.
- `GHSA-qf63-3vvr-7272` and `GHSA-w2m9-rvg6-gfxg` cover HTTP/3-to-HTTP/1 inbound `:authority` downgrade cases.
This report covers the outbound HTTP/1-to-HTTP/3 direction in `HttpConversionUtil.toHttp3Headers(...)` and `Http3FrameToHttpObjectCodec(false)`. Maintainers may choose to group this with the HTTP/2 absolute-form report, but the affected artifact and implementation are different.
Live duplicate evidence is in `evidence/advisory-duplicate-check.tsv`.
Local PoV
PoV file:
`pov/Http3AbsoluteFormHostAuthorityConfusionPovTest.java`
Run from a Netty checkout after copying the PoV file into `codec-http3/src/test/java/io/netty/handler/codec/http3/`:
./mvnw -q -pl codec-http3 \
-Dtest=Http3AbsoluteFormHostAuthorityConfusionPovTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-DskipNativeTests -DskipAutobahnTests -Dmaven.antrun.skip=true testThe PoV is local-only. It does not start a server or contact any third-party host.
It proves:
- direct `HttpConversionUtil.toHttp3Headers(...)` converts `GET https://trusted.example/admin` plus `Host: attacker.example` into `:authority: attacker.example`;
- `Http3FrameToHttpObjectCodec(false)` emits the same conflicting authority through the normal HTTP/1 object to HTTP/3 frame conversion path;
- a matching Host control keeps `trusted.example`;
- an absent Host control falls back to the absolute-form request-target authority, proving the converter already knows how to use that authority.
Observed results:
current 4.2 head: Tests run: 4, Failures: 0, Errors: 0
4.2.15.Final: focused PoV passed
4.2.2.Final: focused PoV passed
patched control: Tests run: 2, Failures: 0, Errors: 0Version sweep details are in `evidence/version-sweep.tsv`.
Why This Is Not Intended Behavior
RFC 9112 says that when an HTTP/1.1 request-target includes an authority component, Host must match that authority. It also says an origin server that receives absolute-form must ignore the received Host header and use the request-target host information instead.
RFC 9114 says HTTP/3 requests with invalid pseudo-header values are malformed, and intermediaries must not forward malformed requests. Converting an HTTP/1 message with a trusted request-target authority into an HTTP/3 request with a different `:authority` creates exactly the kind of authority disagreement that HTTP pseudo-headers are meant to avoid.
Netty's HTTP/2 conversion already has the same root-cause class reported privately as `GHSA-cg2g-fxr4-mg8m`. This report is the HTTP/3 sibling in `io.netty:netty-codec-http3`.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavenio.netty:netty-codec-http3 |
Corregida | 4.2.18.Final | -1 d | 4.2.20.Final no afectada |
4.2.18.FinalArsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/netty/netty/security/advisories/GHSA-hfr2-x62w-v49hLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
