The caddy-security plugin processes the X-Forwarded-Host header, which could lead to various security vulnerabilities (web cache poisoning, business logic flaws, routing-based server-side request forgery [SSRF], and classic server-side vulnerabilities). Additionally, the caddy-security plugin generates QR codes based on this header, which extends the attack surface.
Injecting host override header:
GET /admin/logout HTTP/2
Host: portal.caddysecurity.network
X-Forwarded-Host: portal.caddysecurity.network.evil.domain
To mitigate this issue, do not rely on the Host and X-Forwarded-Host headers in the caddy-security plugin logic. Instead, use the current domain manually specified in the configuration file to generate a QR code.
In addition, we recommend the following:
Use Burp Suite Professional with the Param Miner extension to identify the processing of hidden headers.
Extend the caddy-security documentation to increase user awareness of the HTTP Host header attacks.
More information about our Caddy Security public disclosure:
Severity: Medium
The caddy-security plugin processes the X-Forwarded-Host header, which could lead to various security vulnerabilities (web cache poisoning, business logic flaws, routing-based server-side request forgery [SSRF], and classic server-side vulnerabilities). Additionally, the caddy-security plugin generates QR codes based on this header, which extends the attack surface.
Injecting host override header:
For example:
By manipulating X-Forwarded-related headers, we can manipulate the PNG outcome:
To mitigate this issue, do not rely on the Host and X-Forwarded-Host headers in the caddy-security plugin logic. Instead, use the current domain manually specified in the configuration file to generate a QR code.
In addition, we recommend the following:
More information about our Caddy Security public disclosure: