MEDIUM 5.4

CVE-2026-45692: Caddy Configuration Path Traversal via Authorization Bypass

Caddy, a popular open-source web server known for automatic HTTPS, contains a path traversal vulnerability affecting versions 2.4.0 through 2.11.2. The vulnerability arises from a disagreement between two critical layers: the authorization system checks permissions using simple text matching, while the configuration API parses the same paths using numerical array indexing. An attacker with valid credentials can exploit this mismatch to access configuration objects they shouldn't be able to reach. For example, a user authorized to view `/config/servers/0` might be able to access `/config/servers/1` by manipulating how indices are parsed. The flaw requires authentication, so it primarily affects scenarios where multiple users or services share a Caddy instance.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Weaknesses (CWE)
CWE-187, CWE-863
Affected products
1 configuration(s)
Published / Modified
2026-06-23 / 2026-06-26

NVD description (verbatim)

Caddy is an extensible server platform that uses TLS by default. From 2.4.0 until 2.11.3, the authorization layer and the /config traversal layer do not agree on what object the path refers to. In this case, a path authorized for one config object is accepted, but then resolves to a different config object during traversal. This happens because the authorization layer uses string prefix matching and the /config traversal layer parses array indices numerically using strconv.Atoi(). This vulnerability is fixed in 2.11.3.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from inconsistent path resolution between the authorization layer and the `/config` API traversal layer in Caddy. The authorization system performs string prefix matching to validate access control, while the `/config` endpoint uses Go's `strconv.Atoi()` to parse array indices as integers during object resolution. This semantic mismatch allows an authenticated user to construct requests that pass authorization checks but resolve to unintended configuration objects. For instance, authorization might whitelist `/config/servers/0`, but a crafted request could resolve that same string to access `/config/servers/1` due to how the traversal logic interprets the numeric component. The issue affects all Caddy versions from 2.4.0 through 2.11.2 and is resolved in version 2.11.3, where the authorization and traversal layers now agree on path semantics.

Business impact

This vulnerability could lead to unauthorized disclosure of sensitive configuration data, such as API credentials, TLS certificates, upstream server addresses, and middleware settings stored in Caddy's configuration. In multi-tenant or role-based scenarios, it enables privilege escalation within a single Caddy instance. The impact is limited by the authentication requirement—only users with existing API access can exploit it. However, for organizations using Caddy in shared environments or exposing the `/config` API to internal tools or microservices, the ability to read unintended configuration objects represents a meaningful confidentiality and integrity risk. No denial of service or remote code execution is possible through this vector.

Affected systems

Caddy versions 2.4.0 through 2.11.2 are affected. The vulnerability is present in the core Caddy server platform and affects any deployment exposing the `/config` API endpoint with authentication enabled. Risk is highest in scenarios where the `/config` API is used programmatically by internal services, CI/CD pipelines, or management tools, or where multiple users have different permission levels on the same Caddy instance. Caddy 2.11.3 and later versions contain the fix.

Exploitability

Exploitation requires valid credentials and network access to the `/config` endpoint. The attack is straightforward once authenticated: an attacker need only craft HTTP requests using the path traversal technique to probe and access unintended configuration objects. No special tools, zero-day techniques, or race conditions are required. The CVSS score of 5.4 (MEDIUM) reflects the need for prior authentication and the restriction to information disclosure and limited integrity impact. The vulnerability is not currently tracked in the CISA Known Exploited Vulnerabilities catalog, and no public proof-of-concept or active exploitation has been reported.

Remediation

Upgrade Caddy to version 2.11.3 or later immediately. The fix ensures that both the authorization and traversal layers use identical path resolution semantics, eliminating the mismatch. Organizations unable to upgrade immediately should restrict network access to the `/config` API endpoint using firewall rules or reverse proxy authentication, limiting exposure to trusted internal networks only. Review logs for suspicious `/config` API requests from authenticated users, particularly those accessing unexpected array indices or configuration objects outside their assigned scope.

Patch guidance

Apply Caddy 2.11.3 as soon as practically feasible. Verify the patch by checking the running version with `caddy version` or via the `/metrics` endpoint. No configuration changes are required post-upgrade; the fix is transparent. For users managing Caddy via package managers, ensure you pull updates from official repositories. If using Docker, update the base image or tag to a version containing Caddy 2.11.3 or later. Test in a staging environment before production deployment to confirm compatibility with any custom plugins or middleware.

Detection guidance

Monitor for suspicious `/config` API requests originating from authenticated users, particularly those attempting to access configuration indices or paths outside expected patterns. Look for repeated requests with varying array indices (e.g., `/config/servers/0`, `/config/servers/1`, `/config/servers/2`) that deviate from normal operational patterns. Enable debug logging on the `/config` endpoint if available and correlate authorization denials with successful subsequent requests to different objects. Check Caddy's access logs for authentication failures followed immediately by requests that succeed in accessing sensitive configuration data.

Why prioritize this

This vulnerability merits prompt attention despite its MEDIUM severity rating. The root cause—a fundamental disagreement in path interpretation between security and functional layers—is a systemic issue that undermines the integrity of access control. While exploitation requires authentication, insider threats or compromised service accounts could abuse this flaw to escalate privileges or discover credentials. For organizations relying on Caddy's configuration API in automated workflows, this represents a supply chain-like risk. Patching is straightforward, making remediation friction minimal. Organizations should treat this as HIGH priority within their authenticated-access vulnerability queue.

Risk score, explained

The CVSS 3.1 score of 5.4 reflects: (1) network-accessible attack vector with low complexity; (2) requirement for low-privilege authentication, reducing unauthenticated risk; (3) confidentiality and integrity impact limited to configuration data rather than the underlying system; (4) no availability impact. The score appropriately captures a flaw that threatens configuration secrecy and consistency within a trusted boundary, but does not enable system compromise or denial of service.

Frequently asked questions

Do we need to restart Caddy after upgrading to 2.11.3?

Caddy supports graceful reloads of its configuration, so a full restart is not required. You can upgrade the binary and signal a reload through the API or admin endpoint. However, a standard service restart ensures a clean transition and is recommended for most deployments.

Are there any workarounds if we cannot upgrade immediately?

Yes. Restrict network access to the `/config` API endpoint using a firewall, network policy, or reverse proxy in front of Caddy. Limit access to trusted internal services only, and use strong authentication credentials. Additionally, audit which user accounts and service principals have access to the `/config` endpoint and remove unnecessary permissions.

Can this vulnerability be exploited without authentication?

No. The vulnerability requires valid credentials to access the `/config` API endpoint. Unauthenticated attackers cannot trigger the path traversal behavior. This significantly limits the attack surface in properly secured deployments.

Does this affect Caddy's TLS functionality or core web server capability?

No. The vulnerability is isolated to the `/config` API endpoint and the authorization layer for configuration management. Core web serving, TLS termination, and reverse proxy functions are unaffected. Upgrading poses no risk to ongoing traffic or TLS certificates.

This analysis is based on the official CVE record and Caddy vendor disclosures as of the publication date. Actual attack complexity and real-world impact may vary depending on deployment architecture, network controls, and authentication mechanisms in use. Organizations should verify patch applicability in their environment and conduct testing before production deployment. SEC.co makes no warranty regarding the completeness or accuracy of exploit information or patch effectiveness; always consult official vendor advisories for authoritative guidance. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).