Executive brief
Caddy is a popular web server used to host websites and manage internet traffic. On Windows systems, a flaw in how the server handles file paths allows unauthorized users to bypass security rules intended to protect private folders. This could allow an attacker to view sensitive files, such as backups or credentials, that were supposed to be restricted by a password or access control list.
Technical details
A path normalization discrepancy exists in Caddy's Windows implementation between the request matcher and the file server component. Caddy's 'MatchPath.MatchWithError()' function treats backslashes (e.g., /private\secret.txt) as literal characters rather than directory separators, causing it to skip security rules defined for '/private/*'. However, the 'file_server' module later resolves these backslashes as valid separators on the Windows filesystem. An unauthenticated remote attacker can exploit this by using encoded backslashes (%5c) in a URL to bypass 'basic_auth' or 'respond 403' directives and read sensitive files. This issue is fixed in version 2.11.4.
Affected products
- Caddyserver Caddy < 2.11.4
Timeline
- 2026-06-08: advisory: GitHub Security Advisory published
- 2026-06-23: disclosed: NVD publication date
- 2026-06-23: patched: Fix released in version 2.11.4