CVE-2026-30852
published medium CVSS 4.0 · 5.5Caddy: vars_regexp double-expands user input, leaking env vars and files
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| caddyserver | — | caddy>= 2.7.5, < 2.11.2 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | caddy | Fixed | 2.11.2-r0 | Package fix record |
| Alpine Linux | v3.23 | caddy | Fixed | 2.11.2-r0 | Package fix record |
| Alpine Linux | v3.24 | caddy | Fixed | 2.11.2-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| caddyserver | caddy | >= 2.7.5, < 2.11.2 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
3Provider assertions
2GitHub_M · cna
Caddy: vars_regexp double-expands user input, leaking env vars and files
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ad036f4a2d0f3b5b9989fdb565008786622d1255b20cf2bd61d57ca18fc4aa54
- Ingested
- 23 Sep 2026, 09:09:24 UTC
- Source record
- Official CVE record