Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-30852: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in caddyserver caddy

0
Medium
VulnerabilityCVE-2026-30852cvecve-2026-30852cwe-200cwe-74
Published: Sat Mar 07 2026 (03/07/2026, 16:28:26 UTC)
Source: CVE Database V5
Vendor/Project: caddyserver
Product: caddy

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/14/2026, 19:59:49 UTC

Technical Analysis

CVE-2026-30852 is a vulnerability in the Caddy web server platform, specifically affecting versions from 2.7.5 to before 2.11.2. The root cause lies in the vars_regexp matcher implementation within vars.go at line 337, where user-controlled input is double-expanded through the Caddy replacer mechanism. Normally, when a placeholder such as {http.request.header.X-Input} is matched, the header value is resolved once. However, due to the bug, the value is passed through the replacer's ReplaceAll() function a second time, causing unintended evaluation of embedded placeholders. An attacker can exploit this by injecting payloads like {env.DATABASE_URL} or {file./etc/passwd} into HTTP request headers. The server then evaluates these placeholders, exposing sensitive environment variables, file contents, or system information in the response or logs. This vulnerability is a combination of CWE-200 (Exposure of Sensitive Information) and CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component). It requires no privileges or user interaction and can be triggered remotely over the network. The vulnerability was publicly disclosed and patched in Caddy version 2.11.2. No known exploits are currently reported in the wild, but the potential for sensitive data leakage is significant. The CVSS 4.0 base score is 5.5, reflecting medium severity with network attack vector, low complexity, no privileges or user interaction needed, and limited confidentiality impact.

Potential Impact

The primary impact of CVE-2026-30852 is the unauthorized disclosure of sensitive information, including environment variables, system files, and configuration data. This can lead to further attacks such as credential theft, lateral movement, or system compromise if attackers gain access to secrets like database URLs or private keys. The vulnerability does not directly affect data integrity or availability but significantly compromises confidentiality. Organizations using vulnerable Caddy versions in internet-facing roles, especially those hosting sensitive applications or infrastructure, face increased risk of data leakage. This can damage reputation, violate compliance requirements, and lead to financial losses. Since exploitation requires only sending crafted HTTP headers, the attack surface is broad and easily accessible to remote attackers. The absence of known exploits in the wild reduces immediate risk but does not eliminate the threat, especially as proof-of-concept code could emerge. The medium severity rating suggests prioritizing remediation but indicates the vulnerability is not as critical as remote code execution flaws.

Mitigation Recommendations

1. Upgrade Caddy server to version 2.11.2 or later immediately to apply the official patch that fixes the double-expansion issue. 2. Implement strict input validation and sanitization on HTTP headers at the application or reverse proxy level to block suspicious placeholder patterns such as {env.*} or {file.*}. 3. Restrict access to sensitive environment variables and files by minimizing their exposure and using least privilege principles for the Caddy process. 4. Monitor web server logs for unusual header values containing placeholder syntax indicative of exploitation attempts. 5. Employ Web Application Firewalls (WAFs) with custom rules to detect and block requests containing suspicious placeholder injections. 6. Conduct regular security audits and penetration testing focusing on injection and information disclosure vectors in web servers. 7. Isolate critical services and sensitive data from direct exposure to internet-facing Caddy instances where possible. 8. Educate development and operations teams about secure configuration and the risks of dynamic placeholder evaluation in server software.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-05T21:27:35.341Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69ac564fc48b3f10ffb12c24

Added to database: 3/7/2026, 4:46:07 PM

Last enriched: 3/14/2026, 7:59:49 PM

Last updated: 4/21/2026, 11:52:14 AM

Views: 100

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses