Skip to content

Refuse CR/LF/NUL in the proxy_auth_fun result - #989

Merged
benoitc merged 1 commit into
masterfrom
fix/proxy-auth-header-ctl
Oct 25, 2026
Merged

benoitc merged 1 commit into
masterfrom
fix/proxy-auth-header-ctl

Conversation

@benoitc

@benoitc benoitc commented Oct 25, 2026

Copy link
Copy Markdown
Owner

After a 407, the value returned by proxy_auth_fun was written as is into the Proxy-Authorization line of the CONNECT retry. CR or LF in it added header lines of their own to the request sent to the proxy. Every other caller-supplied value on the request path is already stripped or refused (hackney_headers, the CONNECT target host).

Such a value is now refused with {error, {proxy_auth_error, invalid_header}} before anything is sent.

Reported by manus-pi (GHSA-465p-49rx-v264).

The callback's value was written as is into the Proxy-Authorization
line of the CONNECT retry, so CR/LF in it added header lines. Every
other caller-supplied header is already stripped or refused.
@benoitc
benoitc force-pushed the fix/proxy-auth-header-ctl branch from b09a0bc to 5ee7d7d Compare October 25, 2026 21:02
@benoitc
benoitc merged commit 535b112 into master Oct 25, 2026
6 checks passed
@benoitc benoitc mentioned this pull request Oct 25, 2026
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