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

AILast updated: 03/07/2026, 17:02:16 UTC

Technical Analysis

CVE-2026-30852 affects the Caddy web server, an extensible platform that uses TLS by default. The vulnerability exists in the vars_regexp matcher component, specifically in the file 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 processed, the header value is resolved once. However, due to the bug, the resolved value is passed through the replacer's ReplaceAll() function a second time, causing unintended evaluation of embedded placeholders. This allows an attacker to craft HTTP request headers containing placeholders like {env.DATABASE_URL} or {file./etc/passwd}, which the server then evaluates, leaking sensitive environment variables, arbitrary file contents, and system information. This behavior results from unsafe input evaluation (CWE-74) leading to exposure of sensitive information to unauthorized actors (CWE-200). The vulnerability requires no authentication or user interaction and can be exploited remotely over the network. It affects all Caddy versions from 2.7.5 up to but not including 2.11.2. The issue has been fixed in version 2.11.2 by correcting the input handling to prevent double expansion. No public exploits are known at this time, but the impact of data leakage is significant.

Potential Impact

The vulnerability enables attackers to remotely extract sensitive environment variables, file contents, and system information from servers running vulnerable Caddy versions. This can lead to exposure of secrets such as database credentials, API keys, and configuration details, which attackers can leverage for further compromise, lateral movement, or data exfiltration. The unauthorized disclosure undermines confidentiality and may indirectly affect integrity and availability if attackers use the leaked information to escalate privileges or disrupt services. Since exploitation requires no authentication or user interaction, any publicly accessible Caddy server with affected versions is at risk. Organizations using Caddy in production, especially those hosting sensitive applications or data, face increased risk of data breaches and compliance violations. Although no exploits are currently reported in the wild, the ease of exploitation and severity of data exposure make this a critical concern for affected deployments.

Mitigation Recommendations

The primary mitigation is to upgrade all affected Caddy server instances to version 2.11.2 or later, where the vulnerability is patched. Until upgrades can be performed, organizations should implement strict input validation and filtering on HTTP headers to block suspicious placeholders containing patterns like {env.*} or {file.*}. Deploying Web Application Firewalls (WAFs) with custom rules to detect and block such injection attempts can reduce exposure. Additionally, review and minimize sensitive environment variables and file permissions accessible to the Caddy process to limit potential data leakage. Monitoring server logs for unusual header values or repeated requests containing suspicious placeholders can help detect exploitation attempts. Finally, conduct a thorough audit of secrets and credentials potentially exposed and rotate them if compromise is suspected.

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/7/2026, 5:02:16 PM

Last updated: 3/8/2026, 4:11:29 AM

Views: 6

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 in Console -> Billing 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