{"id":"CVE-2026-30852","aliases":["GHSA-m2w3-8f23-hxxf","GO-2026-4644"],"url":"https://o3.security/vulnerability/CVE-2026-30852","summary":"Caddy: vars_regexp double-expands user input, leaking env vars and files","details":"Caddy is an extensible server platform that uses TLS by default. From version 2.7.5 to before version 2.11.2, the vars_regexp matcher in vars.go:337 double-expands user-controlled input through the Caddy replacer. When vars_regexp matches against a placeholder like {http.request.header.X-Input}, the header value gets resolved once (expected), then passed through repl.ReplaceAll() again (the bug). This means an attacker can put {env.DATABASE_URL} or {file./etc/passwd} in a request header and the server will evaluate it, leaking environment variables, file contents, and system info. This issue has been patched in version 2.11.2.","published":"2026-03-07T16:28:26.894Z","modified":"2026-08-12T03:51:43.018907414Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/caddyserver/caddy/v2/modules/caddyhttp","fixedVersion":"2.11.2"}],"fix":{"url":"https://github.com/caddyserver/caddy/pull/5408","label":"caddyserver/caddy#5408"},"references":[{"type":"WEB","url":"https://github.com/caddyserver/caddy/releases/tag/v2.11.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/30xxx/CVE-2026-30852.json"},{"type":"ADVISORY","url":"https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30852"},{"type":"FIX","url":"https://github.com/caddyserver/caddy/pull/5408"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:43.018907414Z"}}