CVE-2026-30852

Source
https://cve.org/CVERecord?id=CVE-2026-30852
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-30852.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-30852
Aliases
Downstream
Related
Published
2026-03-07T16:28:26Z
Modified
2026-08-12T03:51:43Z
Severity
  • 5.5 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Caddy: vars_regexp double-expands user input, leaking env vars and files
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-200",
        "CWE-74"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/30xxx/CVE-2026-30852.json"
}
References

Affected packages

Git / github.com/caddyserver/caddy

Affected ranges

Type
GIT
Repo
https://github.com/caddyserver/caddy
Events
Database specific
Show details
{
    "cpe": "cpe:2.3:a:caddyserver:caddy:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "2.7.5"
        },
        {
            "fixed": "2.11.2"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Affected versions

v2.*
v2.10.0
v2.10.0-beta.1
v2.10.0-beta.2
v2.10.0-beta.3
v2.10.0-beta.4
v2.10.1
v2.10.2
v2.11.0
v2.11.0-beta.1
v2.11.0-beta.2
v2.11.1
v2.7.5
v2.8.0
v2.8.0-beta.1
v2.8.0-beta.2
v2.8.0-rc.1
v2.8.1
v2.8.2
v2.8.3
v2.8.4
v2.9.0
v2.9.0-beta.1
v2.9.0-beta.2
v2.9.0-beta.3
v2.9.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-30852.json"