{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-30852","id":"CVE-2026-30852","title":"Caddy: vars_regexp double-expands user input, leaking env vars and files","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). ","descriptionLong":"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","updated":"2026-10-28T02:31:14.419089092Z","reserved":"2026-03-05T21:27:35.341Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":5.5,"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","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":5.5,"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","rating":"medium","source":"GitHub_M"},{"version":"4.0","score":5.5,"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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"medium","source":"github.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"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","rating":"medium","source":"GitHub"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"NVD"}],"rating":"medium","products":["caddyserver caddy"],"affectedProducts":[{"vendor":"caddyserver","product":"caddy","defaultStatus":null,"versions":[{"version":">= 2.7.5, < 2.11.2","status":"affected"}],"platforms":[]}],"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"],"advisory":"GHSA-m2w3-8f23-hxxf"},{"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"],"advisory":"GO-2026-4644"}],"cwes":["CWE-200","CWE-74"],"aliases":["GHSA-m2w3-8f23-hxxf","GO-2026-4644"],"references":[{"url":"https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf","tags":["x_refsource_CONFIRM","Exploit","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://github.com/caddyserver/caddy/pull/5408","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/caddyserver/caddy/releases/tag/v2.11.2","tags":["x_refsource_MISC","Product","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/30xxx/CVE-2026-30852.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30852","tags":["advisory"]},{"url":"https://github.com/caddyserver/caddy","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.00466,"epssPercentile":0.41126,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-30852","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30852","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-30852","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-m2w3-8f23-hxxf","ok":true,"note":"GHSA-m2w3-8f23-hxxf"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-30852","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}