{"cve":"CVE-2026-30852","nvd":{"published":"2026-03-07T17:15:52.733","modified":"2026-06-17T10:33:02.100","status":"Analyzed","description":"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.","cvss_v4":{"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P","score":5.5},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5},"cwes":["CWE-74","CWE-200"],"references":["https://github.com/caddyserver/caddy/pull/5408","https://github.com/caddyserver/caddy/releases/tag/v2.11.2","https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf"],"products":["caddyserver:caddy"],"source":"nvd","synced_at":"2026-10-19T22:25:53.701907451+00:00"},"epss":{"cve":"CVE-2026-30852","score":0.00436,"percentile":0.37939,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m2w3-8f23-hxxf","url":"https://osv.dev/vulnerability/GHSA-m2w3-8f23-hxxf","summary":"Caddy's vars_regexp double-expands user input, leaking env vars and files","modified":"2026-03-23T04:56:01.871783897Z","packages":[{"ecosystem":"Go","name":"github.com/caddyserver/caddy/v2/modules/caddyhttp","purl":"pkg:golang/github.com/caddyserver/caddy/v2/modules/caddyhttp","ranges":[">=2.7.5 <2.11.2"],"fixed":["2.11.2"]}]},{"id":"GO-2026-4644","url":"https://osv.dev/vulnerability/GO-2026-4644","summary":"Caddy's vars_regexp double-expands user input, leaking env vars and files in github.com/caddyserver/caddy","modified":"2026-03-23T04:52:47.870034Z","packages":[{"ecosystem":"Go","name":"github.com/caddyserver/caddy/v2","purl":"pkg:golang/github.com/caddyserver/caddy/v2","ranges":[">=2.7.5 <2.11.2"],"fixed":["2.11.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}