H3-2026-1062¶
Grav CMS Bundled Caddyfile Sensitive File Exposure Vulnerability
| Category | SECURITY_MISCONFIGURATION |
| Base Score | 7.5 |
Description¶
Grav CMS ships a Caddyfile at webserver-configs/Caddyfile that expresses its security rules using nginx-style regular expressions inside Caddy's path matcher. Caddy's path matcher only understands literal paths with wildcards, so directives intended to return 403 for sensitive directories never match any request. Remote attackers can retrieve files including composer.lock, composer.json, user/config/.yaml, and user/accounts/.yaml, the last of which contains bcrypt password hashes, from any Grav site deployed with the bundled Caddyfile. The root cause is a syntax mismatch between the Caddyfile's intended matcher rules and what Caddy's path directive actually supports.
Impact¶
Attackers can read the full third-party dependency manifest, useful for chaining known component vulnerabilities. Site configuration and admin account files, including bcrypt password hashes, become retrievable without authentication. Application logs may also be exposed. Any Grav CMS deployment using the vendor-supplied Caddyfile without additional hardening is affected.