5.3medium
swift-nio-http2: Missing CR/LF/NUL validation in header values
- Severity
- 5.3medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.18% (higher than 7% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- apple
- Also known as
- GHSA-q3g2-m552-3r9c
Description
SwiftNIO HTTP/2 was missing validation on inbound HEADERS frames that let CR, LF, NUL, SP and other control characters reach an HTTP/1.1 backend through NIOHTTP2's HTTP/2-to-HTTP/1 codec, enabling HTTP request smuggling or response splitting. This vulnerability is addressed in swift-nio-http2 version 1.45.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Apple swift-nio-http2 | before 1.45.0 | CVE List |
| swift-nio-http2 (SwiftURL) | before 1.45.0 | GitHub Advisory Database |
| apple swiftnio_http/2 | before 1.45.0 | NVD |
All scores
| CISA-ADP | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
SwiftNIO HTTP/2 was missing validation on inbound HEADERS frames that let CR, LF, NUL, SP and other control characters reach an HTTP/1.1 backend through NIOHTTP2's HTTP/2-to-HTTP/1 codec, enabling HTTP request smuggling or response splitting. This vulnerability is addressed in swift-nio-http2 version 1.45.0.
GitHub Advisory Database
Summary
SwiftNIO HTTP/2 was missing validation on inbound HEADERS frames that let CR, LF, NUL, SP and other control characters reach an HTTP/1.1 backend through NIOHTTP2's HTTP/2-to-HTTP/1 codec, enabling HTTP request smuggling or response splitting.
Impact
Two related gaps in inbound header validation, against any application using HTTP2ToHTTP1Codec (or HTTP2FramePayloadToHTTP1Codec) to front an HTTP/1.1 backend:
Regular header field values were only checked against a forbidden-name
list (connection, transfer-encoding, proxy-connection, keep-alive,
upgrade); the value itself was never inspected. An attacker-controlled
regular header field value containing CR or LF passed validation and, once
serialized as name: value CRLF by the codec, terminated the field early
and injected extra header lines into the outbound HTTP/1.1 message.
Pseudo-header values (:path in particular) were only checked against
CR, LF and NUL. A :path value containing SP serializes into the
request-target of METHOD SP request-target SP HTTP-version CRLF, so a
value like /a HTTP/1.1 produces GET /a HTTP/1.1 HTTP/1.1 — a
parser-differential request line depending on whether a downstream reader
takes the first or last SP-delimited token as the version.
Neither of these is reachable on a stock pipeline: NIOHTTP1's outbound
validator (enableOutboundHeaderValidation, on by default) already rejects
these characters on write. The exposure is pipelines that skip outbound
validation, or any code that reads validated-looking HTTPRequestHead.headers
and forwards the values on trusting that HTTP/2 already checked them.
Fix
Fixed in 48bfd90 and 45bdf67.
Mitigation
Upgrade to 1.45.0
NVD (es)
SwiftNIO HTTP/2 carecía de validación en los marcos HEADERS entrantes, lo que permitía que CR, LF, NUL, SP y otros caracteres de control alcanzaran un backend HTTP/1.1 a través del codec de HTTP/2 a HTTP/1 de NIOHTTP2, posibilitando el contrabando de solicitudes HTTP o la división de respuestas. Esta vulnerabilidad se ha solucionado en la versión 1.45.0 de swift-nio-http2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-64785 changed 2026-07-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q3g2-m552-3r9c changed 2026-07-24 | CC-BY-4.0 |
| NVD | CVE-2026-64785 changed 2026-10-24 | Public domain |