{"id":"CVE-2026-30852","state":"PUBLISHED","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). 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.","publishedAt":"2026-03-07T16:28:26.894Z","updatedAt":"2026-03-09T18:24:55.495Z","severity":{"score":5.5,"label":"Medium","version":"4.0","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","source":"GitHub_M"},"assigner":"GitHub_M","products":["caddyserver caddy"],"affected":[{"vendor":"caddyserver","product":"caddy","versions":[{"version":">= 2.7.5, < 2.11.2","status":"affected"}]}],"references":["https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf","https://github.com/caddyserver/caddy/pull/5408","https://github.com/caddyserver/caddy/releases/tag/v2.11.2"],"weaknesses":["CWE-200","CWE-74"],"ingestedAt":"2026-10-29T20:11:31.369Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/30xxx/CVE-2026-30852.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-30852","state":"PUBLISHED","datePublished":"2026-03-07T16:28:26.894Z","dateUpdated":"2026-03-09T18:24:55.495Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-05T21:27:35.341Z"},"containers":{"cna":{"title":"Caddy: vars_regexp double-expands user input, leaking env vars and files","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"caddyserver","product":"caddy","versions":[{"version":">= 2.7.5, < 2.11.2","status":"affected"}]}],"references":[{"url":"https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf","name":"https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/caddyserver/caddy/pull/5408","name":"https://github.com/caddyserver/caddy/pull/5408","tags":["x_refsource_MISC"]},{"url":"https://github.com/caddyserver/caddy/releases/tag/v2.11.2","name":"https://github.com/caddyserver/caddy/releases/tag/v2.11.2","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":5.5,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-200","lang":"en","description":"CWE-200: Exposure of Sensitive Information to an Unauthorized Actor","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-74","lang":"en","description":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-03-07T16:28:26.894Z"},"source":{"advisory":"GHSA-m2w3-8f23-hxxf","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-09T18:19:34.437219Z","id":"CVE-2026-30852","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-09T18:24:55.495Z"}}]}}}