{
  "id": "CVE-2026-30852",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-30852",
  "published_at": "2026-03-07T16:28:26.894Z",
  "title": "Caddy: vars_regexp double-expands user input, leaking env vars and files",
  "vendor": "caddyserver",
  "product": "caddy",
  "cvss": {
    "score": 7.5,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-200",
  "cpes": [
    "cpe:2.3:a:caddyserver:caddy:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 5.5,
    "nvd": 7.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "caddyserver",
        "product": "caddy",
        "ranges": [
          "\u003e= 2.7.5, \u003c 2.11.2"
        ],
        "fixed_in": [
          "2.11.2"
        ]
      }
    ],
    "upgrade": [
      "Upgrade caddy to 2.11.2 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/caddyserver/caddy/security/advisories/GHSA-m2w3-8f23-hxxf"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/caddyserver/caddy/pull/5408"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/caddyserver/caddy/releases/tag/v2.11.2"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
