All vulnerabilities

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
Weakness
Expression language injection (CWE-917)
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.
From caddyserver/caddy's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
CaddyServers and applications · github:caddyserver/caddy
  • Every version up to 2.11.2
CaddyGo · osv:Go:github.com/caddyserver/caddy/v2
  • From 2.11.0 up to 2.11.2
  • From 2.11.0 before 2.11.3

About Caddy

open source web server

From Wikidata, CC0 1.0.
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

Release lines

ReleaseLatestSecurity fixes
22.11.9Yes
11.0.5Ended 1 Jul 2020

From endoflife.date.

References