Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with placeholder-laden header
-
DeliveryRewrite handler first-pass expands header into path
-
ExploitTrailing '?' splits bytes into buildQueryString
-
ExecutionSecond placeholder pass evaluates {env.X}/{file.X}
-
ImpactDisclose env/request vars or readable file contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a Caddy (<=2.11.3) rewrite handler whose configured URI ends with a literal '?' AND embeds an attacker-controllable placeholder such as {http.request.header.*} - this is a non-default operator-written configuration. When those conditions hold, an unauthenticated remote attacker (CVSS PR:N/UI:N) can inject {env.*} or {http.request.*} placeholders to disclose environment/request variables; disclosure of arbitrary readable files (e.g. via {file./etc/passwd}) additionally requires the Caddy file placeholder provider to be registered. Limiting factor: deployments without a rewrite rule matching this exact pattern are not exploitable, so despite the network/unauthenticated vector the practical exposure is narrow. |
| Impact | This is a moderate, configuration-gated information-disclosure flaw rather than the RCE its input tags claim. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L, 6.5) marks it network-reachable and unauthenticated, which is accurate for the attack surface, but the AC:L is optimistic: exploitation requires a specific non-default Caddy config (a rewrite rule whose URI ends with a literal '?' and embeds an attacker-controlled placeholder such as a request header), so real-world attack complexity is higher than the score implies. No EPSS score, SSVC decision, or POC/KEV signal was supplied - exploitation status is 'no public exploit identified at time of analysis', though the fix commit ships regression tests (GHSA-j8px-rmrx-76h9) that concretely demonstrate the double-expansion mechanism, effectively lowering the bar to build a working exploit. The vendor also assigned A:L, which appears unjustified - the described impact is data disclosure (env vars, request variables, and, when the file provider is registered, arbitrary readable files) with no availability or integrity effect. Net: a real but niche issue whose severity hinges entirely on whether a given Caddy deployment uses the vulnerable rewrite pattern; not a widespread mass-exploitation priority, but arbitrary readable-file disclosure (e.g. secrets, /etc/passwd) on affected configs makes it a genuine confidentiality risk worth patching. |
| Exploit ScenarioDerived | An operator runs Caddy with a rewrite rule like URI '/serve/{http.request.header.X-Fwd}?' (trailing literal '?'). An unauthenticated attacker sends an HTTP request with a header value such as 'foo?path={file./etc/passwd}'; the first placeholder pass expands the header into the path, the trailing '?' causes the bytes to be split and fed to buildQueryString, which runs a second placeholder pass that evaluates the injected {file...} or {env...} placeholder and reflects the secret. No public weaponized exploit is identified, but the fixed commit's regression tests demonstrate the exact injection strings. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
A configuration-gated information-disclosure flaw in Caddy 2.11.3 and earlier allows an unauthenticated remote attacker to leak environment variables, request variables, and - when the file placeholder provider is registered - arbitrary readable files. The weakness only materializes when an operator-written rewrite handler uses a URI ending in a literal '?' while embedding an attacker-controllable placeholder such as {http.request.header.*}; under those conditions the first-pass expansion output is re-parsed by buildQueryString, which performs a second placeholder pass and evaluates injected {env.*}, {http.request.*}, or {file.*} syntax. No public exploit code was identified at time of analysis and the flaw is not in CISA KEV; the vendor has released a fix in Caddy 2.11.4, and because exposure depends entirely on a non-default rewrite configuration, practical risk is narrow despite the network-facing, unauthenticated vector.
RemediationAI
Upgrade Caddy to version 2.11.4 or later, which contains the vendor fix that percent-encodes '{' and '}' in the injected query string so buildQueryString cannot re-expand attacker-supplied placeholder syntax (see https://github.com/caddyserver/caddy/releases/tag/v2.11.4 and the advisory https://github.com/caddyserver/caddy/security/advisories/GHSA-j8px-rmrx-76h9). Where immediate upgrading is not possible, audit configuration files for rewrite directives whose URI ends with a literal '?' while embedding client-controllable values such as {http.request.header.*}, and either remove the trailing literal '?' or avoid interpolating untrusted request data into that position - this eliminates the second expansion pass entirely and is a low-side-effect change. Deployments that cannot modify rewrite rules can front Caddy with a proxy or WAF rule that rejects request paths or header values containing '{' and '}' characters, at the cost of possibly breaking legitimate clients that send those bytes; additionally, avoid enabling the file placeholder provider in configurations that also use such rewrite rules, since its registration escalates the impact from variable disclosure to arbitrary readable-file disclosure. Note the fixing commit and related tests were merged via upstream pull request 7761, so operators tracking Caddy from sources should update past that commit even before upgrading to a tagged release.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Caddy is a Go-based extensible HTTP server platform whose placeholder/replacer layer performs string substitution in configuration and request values. The vulnerable code path is modules/caddyhttp/rewrite/rewrite.go's Rewrite.Rewrite(), which handles rewrite URIs. When a configured rewrite URI terminates in a literal question mark, the request path produced by the first placeholder expansion is split at '?' and the resulting query fragment is passed into buildQueryString. That helper runs a second placeholder-expansion pass over its input, so any '{' and '}' bytes that originated from client-controlled replacement values (for example a forwarded header inserted via {http.request.header.X-Fwd}) are treated as live placeholder syntax rather than literal data. An attacker can therefore smuggle {env.SECRET}, {http.request.*}, or - with the file provider registered - {file./etc/passwd} into the second pass and have Caddy evaluate and reflect the result. This is fundamentally a code-injection class issue (CWE-94) manifesting as data disclosure rather than arbitrary code execution, since the injected content is limited to Caddy's placeholder providers. The upstream commit 176b043b0104cee3f894023cd5a598ac29e404bb addresses the root cause by percent-encoding '{' as %7B and '}' as %7D in the injected query string before buildQueryString runs, so attacker-supplied braces can no longer be reinterpreted as placeholder delimiters.
Know when Caddy gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Non-default vulnerable rewrite config raises AC:H; unauthenticated remote so PR:N/UI:N; worst case reads arbitrary readable files/secrets (C:H); no integrity or availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Caddy is an extensible server platform that uses TLS by default. In version 2.11.3 and earlier, three configuration-dependent weaknesses affect the handler and placeholder layer. In modules/caddyhttp/rewrite/rewrite.go, Rewrite.Rewrite() can pass attacker-controlled replacement bytes through buildQueryString for a second placeholder expansion when a rewrite URI ends with a literal question mark, allowing injected environment or request-variable placeholders to disclose data and, when the file provider is registered, allowing injected file placeholders to disclose readable files. The issue is fixed in version 2.11.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
FastCGI path splitting vulnerability in Caddy before 2.11.1 allows request smuggling or path confusion when proxying to
TLS error swallowing in Caddy web server before 2.11.1 allows bypassing client certificate authentication. Errors in Cli
Host header case sensitivity bypass in Caddy before 2.11.1. Virtual host routing can be bypassed by using alternate casi
Case sensitivity bypass in Caddy web server path matching before 2.11.1. HTTP path matchers can be bypassed using altern
Caddy versions 2.10.0 through 2.11.1 fail to strip client-supplied headers in the forward_auth copy_headers directive, e
Caddy versions 2.7.5 through 2.11.1 contain a template injection vulnerability in the vars_regexp matcher that allows re
An out-of-bounds read in the rewrite function at /modules/caddyhttp/rewrite/rewrite.go in Caddy v2.5.1 allows attackers
Caddy versions prior to 2.11.1 fail to sanitize backslashes in file path matching, allowing attackers to bypass path-bas
Caddy versions prior to 2.11.1 allow unauthenticated cross-origin requests to the admin API when origin enforcement is d
An issue was discovered in caddy (for TYPO3) before 7.2.10. Rated medium severity (CVSS 6.1), this vulnerability is remo
Caddy through 0.11.0 sends incorrect certificates for certain invalid requests, making it easier for attackers to enumer
EUVD-2026-82474
GHSA-j8px-rmrx-76h9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB