Live threats

All CVEs / Caddyserver

CVE-2026-30852Caddyserver Caddy

Medium 5.5 No auth needed

Priority
48
CVSS 4.0
5.5
EPSS
—
Auth required
No
Published
Mar 7, 2026
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-74, CWE-200
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Caddy.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
caddyservercaddy≥ 2.7.5 < 2.11.2

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.