Description
The Caddy Defender plugin is a middleware for Caddy that allows users to block or manipulate requests based on the client's IP address. Prior to version 0.10.1, Caddy Defender used `r.RemoteAddr` when evaluating whether a request should be blocked. `RemoteAddr` is the address of the immediate peer connected to Caddy. In deployments where Caddy is behind a trusted proxy, CDN, or load balancer, the immediate peer is usually the proxy, not the original client. Caddy resolves the original client address into its `client_ip` request variable after applying the configured `trusted_proxies` policy, but Defender did not use that value. As a result, clients from blocked IP ranges could bypass Defender when accessing Caddy through a trusted proxy whose own IP address was not blocked. This affects deployments that use Defender behind trusted proxies and expect it to enforce blocking based on the real client IP. The issue is fixed in version 0.10.1 by making Defender prefer Caddys resolved `client_ip` request variable when it is available. Defender falls back to `RemoteAddr` only when Caddy has not provided a resolved client IP. There is no complete workaround in affected Defender versions for deployments that rely on Caddy's trusted proxy client IP resolution. Until upgrading, affected users should enforce equivalent IP blocking at the trusted proxy, CDN, load balancer, firewall, or other edge layer before traffic reaches Caddy. Deployments where Caddy receives traffic directly from clients, without an intermediate trusted proxy, are not affected by this bypass.
Published: 2026-07-20
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Caddy Defender middleware filters requests based on the client's IP address, but prior to version 0.10.1 it evaluated the immediate peer address (r.RemoteAddr) instead of the client IP that Caddy resolves via its trusted‑proxy policy. In deployments where Caddy is behind a CDN, load balancer, or other trusted proxy, the real client address is stored in the client_ip request variable, yet Defender ignored this value. Consequently, a request from a blocked IP can reach the protected application if it arrives through a proxy whose own address is not blocked. The issue was fixed in Defender 0.10.1, which now prefers the client_ip value when available and only falls back to r.RemoteAddr when no resolved IP exists. Until an upgrade is performed, the only reliable mitigation is to block offensive IP ranges at the edge layer (e.g., in the proxy, CDN, load balancer, or firewall) before traffic reaches Caddy, as no complete internal workaround exists for older Defender releases. This weakness involves insufficient access control (CWE‑284) and exploitation of non‑privileged principals (CWE‑348).

Affected Systems

The issue affects installations of the Caddy Defender plugin with versions older than 0.10.1 when used in environments that rely on Caddy’s trusted‑proxy client‑IP resolution. Deployments where Caddy serves directly from client connections, without an intermediate trusted proxy, are not impacted. The fix is bundled in version 0.10.1 of the plugin, provided by the vendor JasonLovesDoggo.

Risk and Exploitability

With a CVSS score of 8.2, the vulnerability is considered high severity. The EPSS score is less than 1%, indicating a low exploitation probability, and the flaw is not catalogued in CISA KEV, suggesting limited evidence of active exploitation. The attack requires that an adversary controls traffic at a proxy or can craft requests to traverse a trusted proxy to Caddy, and must also identify a blocked IP that the defender targets. While the vector is mainly network‑based, the damage can include unauthorized access and lateral movement if the defender was the only block. Official guidance recommends upgrading, and until then, blocking at the edge layer is the safest mitigation.

Generated by OpenCVE AI on July 30, 2026 at 19:16 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Caddy Defender to version 0.10.1 or later.
  • If an upgrade is delayed, configure the trusted proxy, CDN, or firewall in front of Caddy to enforce the desired IP blocks before traffic reaches Caddy.
  • Audit the Caddy trusted_proxies configuration to confirm that all upstream proxies are listed, and test that Defender uses the client_ip variable for IP blocking.

Generated by OpenCVE AI on July 30, 2026 at 19:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3h23-rrpc-3p87 Caddy Defender trusted proxy client IP bypass
History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Jasonlovesdoggo
Jasonlovesdoggo caddy-defender
Vendors & Products Jasonlovesdoggo
Jasonlovesdoggo caddy-defender

Tue, 21 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 20 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Description The Caddy Defender plugin is a middleware for Caddy that allows users to block or manipulate requests based on the client's IP address. Prior to version 0.10.1, Caddy Defender used `r.RemoteAddr` when evaluating whether a request should be blocked. `RemoteAddr` is the address of the immediate peer connected to Caddy. In deployments where Caddy is behind a trusted proxy, CDN, or load balancer, the immediate peer is usually the proxy, not the original client. Caddy resolves the original client address into its `client_ip` request variable after applying the configured `trusted_proxies` policy, but Defender did not use that value. As a result, clients from blocked IP ranges could bypass Defender when accessing Caddy through a trusted proxy whose own IP address was not blocked. This affects deployments that use Defender behind trusted proxies and expect it to enforce blocking based on the real client IP. The issue is fixed in version 0.10.1 by making Defender prefer Caddys resolved `client_ip` request variable when it is available. Defender falls back to `RemoteAddr` only when Caddy has not provided a resolved client IP. There is no complete workaround in affected Defender versions for deployments that rely on Caddy's trusted proxy client IP resolution. Until upgrading, affected users should enforce equivalent IP blocking at the trusted proxy, CDN, load balancer, firewall, or other edge layer before traffic reaches Caddy. Deployments where Caddy receives traffic directly from clients, without an intermediate trusted proxy, are not affected by this bypass.
Title Caddy Defender trusted proxy client IP bypass
Weaknesses CWE-284
CWE-348
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N'}


Subscriptions

Jasonlovesdoggo Caddy-defender
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-21T13:53:08.959Z

Reserved: 2026-05-13T21:04:10.933Z

Link: CVE-2026-46415

cve-icon Vulnrichment

Updated: 2026-07-21T13:53:00.451Z

cve-icon NVD

Status : Deferred

Published: 2026-07-20T16:17:01.163

Modified: 2026-07-23T18:14:47.213

Link: CVE-2026-46415

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T19:30:09Z

Weaknesses