FrankenPHP authentication bypass in header name handling
Summary
FrankenPHP has a flaw that lets a remote attacker, without logging in, send specially named headers (using dots instead of dashes) that PHP rewrites into trusted ones. This lets the attacker spoof headers PHP reads from `$_SERVER`, which can bypass authentication or authorization, fake the client IP to defeat IP-based access control, rate limiting and audit logs, or fake the request scheme to downgrade https to http.
Details
FrankenPHP before 1.13.0 contains an authentication bypass vulnerability that allows unauthenticated attackers to spoof trusted headers by sending dot-form header names that PHP rewrites to underscores. Attackers can send headers like X.Authenticated.User or X.Forwarded.For that map to $_SERVER keys, spoofing user identity, client IP, or scheme.
Affected
Affects FrankenPHP before 1.13.0 (Caddy and embedded modes) when a PHP app or upstream proxy trusts dash-form headers like X-Forwarded-For from $_SERVER. Fixed in 1.13.0.
Suggested Fix
Upgrade to 1.13.0.