CVE-2026-30852 Details
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.
A vulnerability exists in Caddy versions 2.7.5 prior to 2.11.2, where the vars_regexp matcher in vars.go:337 improperly double-expands user-controlled input. This occurs when the matcher processes placeholders like {http.request.header.X-Input}, leading to the unintentional evaluation of environment variables, file contents, and system information. The issue arises because vars_regexp matches user input and then passes the resolved values through a replacement function again, creating a potential leak. In contrast, the header_regexp matcher does not exhibit this behavior, highlighting an inconsistency in how these matchers handle input.
Users can upgrade to Caddy version 2.11.2 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/caddyserver/caddy/pull/5408 | [email protected] | Issue TrackingPatch |
| https://github.com/caddyserver/caddy/releases/tag/v2.11.2 | [email protected] | ProductRelease Notes |
| https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
| CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| caddyserver caddy | >= 2.7.5, < 2.11.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 11, 2026 | Initial Analysis | [email protected] |
| Mar 7, 2026 | New CVE Received | [email protected] |