Go · Servers and applications
GHSA-wwhq-w58m-w29c
Caddy CVE-2026-30852 Fix Bypass
- Severity
- Medium
- Published
- 13 May 2026
- Last changed
- 24 Jul 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 2.11.3
- Also known as
- GO-2026-5730
- Sources
- OSV.dev and GitHub, Project advisories (GitHub)
Description
#
CVE-2026-30852 fixed double expansion in vars_regexp when the variable key is a placeholder (e.g. {http.vars.x}). The fix does NOT protect literal key names (e.g. tenant_id). An attacker injects {env.AWS_SECRET_ACCESS_KEY} or {file./etc/passwd} via a request header → Caddy expands it on the second pass → secrets leaked in response headers.
Affected: Caddy v2.11.0 through v2.11.2 (latest). All versions since the CVE-2026-30852 fix.
modules/caddyhttp/vars.go, lines 215-217:
Same issue at line 358-360 in MatchVarsRE.
fromPlaceholder is false when the variable key is a literal string (not wrapped in {}). The fix only protects fromPlaceholder=true.
- Config: vars tenant_id {http.request.header.X-Tenant-ID}
- Request header: X-Tenant-ID: {env.SECRET}
- Pass 1 (VarsMiddleware.ServeHTTP, line 63): repl.ReplaceAll("{http.request.header.X-Tenant-ID}", "") → resolves to literal string {env.SECRET}. Stored in vars map.
Affected software
| Software | Affected versions |
|---|---|
CaddyServers and applications · github:caddyserver/caddy |
|
CaddyGo · osv:Go:github.com/caddyserver/caddy/v2 |
|
About Caddy
open source web server
- Share of websites with a known web server
- 1.3%W3Techs, Nov 2026
- Docker Hub pulls
- 770,668,265Docker Hub, 15 Nov 2026
- GitHub stars
- 79,049GitHub, 15 Nov 2026
- Forks
- 5,264GitHub, 15 Nov 2026
- Latest release
- v2.11.9GitHub, 15 Nov 2026
- Released
- 5 Nov 2026GitHub
- License
- Apache Software License 2.0Wikidata
- Written in
- GoWikidata
- First published on GitHub
- 13 Jan 2015GitHub
Website Source code Docker image
Vulnerabilities in Caddy
- In our list
- 30
- Published in the last 12 months
- 23
- Critical, last 12 months
- 0
- High, last 12 months
- 9
- Known exploited
- 1
- GHSA-f278-mgc7-46j3php_fastcgi authorization bypass via dot-segments in the request pathMedium 5.9 4 Nov 2026
- GHSA-jf74-f69g-hcj9file_server exposes private keys when the data directory falls back to ./caddyMedium 4 Nov 2026
- GHSA-69hv-5jfc-mvmvrewrite re-decodes {http.matchers.file.remainder}, bypassing path-based deny rulesMedium 4 Nov 2026
- GHSA-25cw-38mq-q7m6file matcher resolves /file/./ to a regular file, bypassing suffix path rulesMedium 4 Nov 2026
- GHSA-r766-rf9f-588hHost and :authority values with dot segments or slashes escape a {host}-based rootHigh 4 Nov 2026
- CVE-2026-55458Caddy has an RFC 7230 §6.1 compliance issue / Hop-by-hop headers that leak throughLow 2.9 13 Oct 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-wwhq-w58m-w29c
- OSV.dev https://osv.dev/vulnerability/GO-2026-5730
- github.com https://github.com/caddyserver/caddy/security/advisories/GHSA-wwhq-w58m-w29c