Back to CVE records
Medium 5.5Published Mar 7, 2026

CVE-2026-30852Caddy: vars_regexp double-expands user input, leaking env vars and files

Updated under an hour ago ()

Does this affect you?

It affects caddyserver caddy. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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
5.5 MEDIUM (v4.0, CNA)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
Weakness (CWE)
CWE-200, CWE-74
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
GitHub_M
NVD analysis
Analyzed
Record last updated
Mar 9, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
caddyserver caddy
caddyserver:caddy (from the name)
from 2.7.5, < 2.11.2
CNA record
caddyserver caddy
caddyserver:caddy
from 2.7.5 before 2.11.2
NVD

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.