CVE-2026-30852Caddyserver Caddy
Medium 5.5 No auth needed
Follow: this CVE · Caddyserver · Caddyserver Caddy We alert you by email or Slack (account required).
- Priority
- 48
- CVSS 4.0
- 5.5
- EPSS
- —
- Auth required
- No
- Published
- Mar 7, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- 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
What happens
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.
What to do
- Apply the vendor's security update for Caddy.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/caddyserver/caddy/v2 |
≥ 2.7.5 < 2.11.2 |
2.11.2 |
go get github.com/caddyserver/caddy/v2@v2.11.2 |
| Go | github.com/caddyserver/caddy/v2/modules/caddyhttp |
≥ 2.7.5 < 2.11.2 |
2.11.2 |
go get github.com/caddyserver/caddy/v2/modules/caddyhttp@v2.11.2 |
Per OSV / GitHub Advisories (GO-2026-4644, GHSA-m2w3-8f23-hxxf). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| caddyserver | caddy | ≥ 2.7.5 < 2.11.2 |
Official advisories
- Security update for govulncheck-vulndb · SUSE · openSUSE-SU-2026:21483-1 · Jul 30, 2026 Critical
- Security update for govulncheck-vulndb · SUSE · SUSE-SU-2026:1042-1 · Mar 25, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Issue Tracking Patch
- github.com Product Release Notes
- github.com Exploit Mitigation Vendor Advisory