Skip to content

Reject CR/LF/NUL in the CONNECT proxy target host - #921

Merged
benoitc merged 1 commit into
masterfrom
fix/connect-proxy-crlf-host
Aug 9, 2026
Merged

Reject CR/LF/NUL in the CONNECT proxy target host#921
benoitc merged 1 commit into
masterfrom
fix/connect-proxy-crlf-host

Conversation

@benoitc

@benoitc benoitc commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The CONNECT proxy handshake concatenates the target host into the request line and Host header with no control-byte check. normalize/2 percent-decodes the host, so a host carrying %0d%0a arrives as raw CRLF and splits the request sent to the proxy. Reject CR/LF/NUL in the target host before building the payload, matching the WebSocket and WebTransport authority guards that already do this.

The CONNECT handshake concatenates the target host into the request line
and Host header with no check for control bytes. normalize/2 percent-
decodes the host, so a host carrying %0d%0a arrives as raw CRLF and splits
the request sent to the proxy. The WebSocket and WebTransport authority
builders already guard against this; the proxy handshake did not.

Reject CR/LF/NUL in the target host before building any payload.
@benoitc
benoitc merged commit 81d47ff into master Aug 9, 2026
6 checks passed
@benoitc benoitc mentioned this pull request Aug 11, 2026
benoitc added a commit that referenced this pull request Aug 11, 2026
Bundles the fixes merged since 4.7.2 (#914/#915, #918/#919, #920, #921,
#922, #924) and the curl-style Content-Length change (#917/#925). Bumps
dependencies to their latest releases: quic 1.8.0, webtransport 0.4.4,
mimerl 1.5.0, cowboy 2.18.0 (test).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant