caddyserver · Caddy · published 2026-03-07
CVE-2026-30852Caddy: vars_regexp double-expands user input, leaking env vars and files
This month Public proof-of-concept exists (SSVC exploitation: poc).
CVE-2026-30852 has a public proof-of-concept exploit, but no confirmed exploitation in the wild. EPSS estimates a 0.5% chance of exploitation in the next 30 days, higher than 41% of all CVEs. This Caddy vulnerability: CVSS 5.5 (v4.0), attacks can be automated. Fixed upstream in Caddy 2.11.2. Patch in your normal monthly cycle.
Jump to: Remediation Exploit intelAffected versionsDescription
Remediation#
Fixed upstream in Caddy 2.11.2.
Patch events
Web serverCaddy
Caddy security release: 2.11.2
Upgrade to
2.11.2Why: CVE-2026-30851: Public proof-of-concept exists (SSVC exploitation: poc).
Exploit intelligence#
| Signal | Value | Source |
|---|---|---|
| Known exploited | No | CISA KEV |
| Ransomware use | — | CISA KEV |
| EPSS (30-day exploitation probability) | 0.5% (41th pct) | FIRST EPSS v2026.06.15 |
| CVSS base score | 5.5 (v4.0)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 | CNA / CISA ADP |
| SSVC exploitation | poc | CISA Vulnrichment |
| SSVC automatable | Yes | CISA Vulnrichment |
| SSVC technical impact | partial | CISA Vulnrichment |
Affected versions (from the CVE record)#
- caddyserver caddy
>= 2.7.5, < 2.11.2(affected)
Description (from the CVE record)#
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.
Quoted from the CVE Program record.