Skip to main content

Caddy CVE-2026-77281

| EUVDEUVD-2026-82474 MEDIUM
Code Injection (CWE-94)
2026-09-17 security-advisories@github.com GHSA-j8px-rmrx-76h9
6.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP request with placeholder-laden header
  2. Delivery
    Rewrite handler first-pass expands header into path
  3. Exploit
    Trailing '?' splits bytes into buildQueryString
  4. Execution
    Second placeholder pass evaluates {env.X}/{file.X}
  5. Impact
    Disclose 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

caddy < 2.11.4

Affected Packages

go github.com/caddyserver/caddy/v2 fix: 2.11.4
euvd caddy fix: 2.11.4

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

Vendor (github) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 22:04 EUVD
CVE Published
Sep 17, 2026 - 21:17 cve.org
MEDIUM 6.5

DescriptionCVE.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

EPSS Score
0.4%
Top 70% exploitable
Prevalence
High
Caddy is a widely deployed open-source Go web server with automatic HTTPS
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Caddy

View all
CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2026-27590 CRITICAL POC
9.8 Feb 24

FastCGI path splitting vulnerability in Caddy before 2.11.1 allows request smuggling or path confusion when proxying to

CVE-2026-27586 CRITICAL POC
9.1 Feb 24

TLS error swallowing in Caddy web server before 2.11.1 allows bypassing client certificate authentication. Errors in Cli

CVE-2026-27588 CRITICAL POC
9.1 Feb 24

Host header case sensitivity bypass in Caddy before 2.11.1. Virtual host routing can be bypassed by using alternate casi

CVE-2026-27587 CRITICAL POC
9.1 Feb 24

Case sensitivity bypass in Caddy web server path matching before 2.11.1. HTTP path matchers can be bypassed using altern

CVE-2026-30851 HIGH POC
8.1 Mar 07

Caddy versions 2.10.0 through 2.11.1 fail to strip client-supplied headers in the forward_auth copy_headers directive, e

CVE-2026-30852 HIGH POC
7.5 Mar 07

Caddy versions 2.7.5 through 2.11.1 contain a template injection vulnerability in the vars_regexp matcher that allows re

CVE-2022-34037 HIGH POC
7.5 Jul 22

An out-of-bounds read in the rewrite function at /modules/caddyhttp/rewrite/rewrite.go in Caddy v2.5.1 allows attackers

CVE-2026-27585 MEDIUM POC
6.5 Feb 24

Caddy versions prior to 2.11.1 fail to sanitize backslashes in file path matching, allowing attackers to bypass path-bas

CVE-2026-27589 MEDIUM POC
6.5 Feb 24

Caddy versions prior to 2.11.1 allow unauthenticated cross-origin requests to the admin API when origin enforcement is d

CVE-2017-5963 MEDIUM POC
6.1 Feb 12

An issue was discovered in caddy (for TYPO3) before 7.2.10. Rated medium severity (CVSS 6.1), this vulnerability is remo

CVE-2018-19148 LOW POC
3.7 Nov 10

Caddy through 0.11.0 sends incorrect certificates for certain invalid requests, making it easier for attackers to enumer

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy