]> git.kaiwu.me - haproxy.git/commit
MINOR: http/hardening: implement hardening "reject-underscore-in-header-name"
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Oct 2026 14:37:52 +0000 (15:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commit72dad7ea11b0ebac6c088d7109d929bd85ad52a3
tree0499cb9aa7bc1f0f21a49ff82c43dd57f369ecc5
parentb3b0b0ac7f87a1edf25448c9afb8df47637a8311
MINOR: http/hardening: implement hardening "reject-underscore-in-header-name"

Rejects requests and responses in which one header field name contains
an underscore character ('_' or \x5C). This character is perfectly
permitted, but some application frameworks which create automatic
variables tend to already turn the dash ('-') into an underscore in
variable names, leading to an ambiguity with the underscore which can
result in the same variable name. This could be abused to bypass some
access-control policy for example. No standard HTTP header uses this,
so it is safe to enable on untrusted listeners.
doc/configuration.txt
include/haproxy/http-t.h
src/h1.c
src/h2.c
src/h3.c
src/http.c