{"id":"CVE-2026-46415","aliases":["CVE-2026-46415","GHSA-3h23-rrpc-3p87","GO-2026-5086"],"related":[],"kind":"vulnerability","state":"published","title":"Caddy Defender trusted proxy client IP bypass","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nCaddy Defender used `r.RemoteAddr` when evaluating whether a request should be blocked. `RemoteAddr` is the address of the immediate peer connected to Caddy.\n\nIn 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.\n\nAs 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.\n\n### Patches\n\nThe issue is fixed 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.\n\nUsers should upgrade to `v0.10.1` or later.\n\n### Workarounds\n\nThere is no complete workaround in affected Defender versions for deployments that rely on Caddys trusted proxy client IP resolution.\n\nUntil upgrading, affected users should enforce equivalent IP blocking at the trusted proxy, CDN, load balancer, firewall, or other edge layer before traffic reaches Caddy.\n\nDeployments where Caddy receives traffic directly from clients, without an intermediate trusted proxy, are not affected by this bypass.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Caddy Defender trusted proxy client IP bypass in pkg.jsn.cam/caddy-defender","format":"markdown","source":"go"},{"lang":"es","text":"El plugin Caddy Defender es un middleware para Caddy que permite a los usuarios bloquear o manipular solicitudes basándose en la dirección IP del cliente. Antes de la versión 0.10.1, Caddy Defender utilizaba “r.RemoteAddr” al evaluar si una solicitud debía ser bloqueada. “RemoteAddr” es la dirección del par inmediato conectado a Caddy. En implementaciones donde Caddy está detrás de un proxy de confianza, CDN o balanceador de carga, el par inmediato suele ser el proxy, no el cliente original. Caddy resuelve la dirección del cliente original en su variable de solicitud “client_ip” después de aplicar la política “trusted_proxies” configurada, pero Defender no utilizaba ese valor. Como resultado, los clientes de rangos de dirección IP bloqueados podían eludir a Defender al acceder a Caddy a través de un proxy de confianza cuya propia dirección IP no estaba bloqueada. Esto afecta a las implementaciones que utilizan Defender detrás de proxies de confianza y esperan que aplique el bloqueo basándose en la dirección IP real del cliente. El problema se soluciona en la versión 0.10.1 haciendo que Defender prefiera la variable de solicitud “client_ip” resuelta de Caddy cuando esté disponible. Defender recurre a “RemoteAddr” solo cuando Caddy no ha proporcionado una dirección IP de cliente resuelta. No existe una solución alternativa completa en las versiones afectadas de Defender para implementaciones que dependen de la resolución de la dirección IP del cliente por parte del proxy de confianza de Caddy. Hasta la actualización, los usuarios afectados deben aplicar un bloqueo de dirección IP equivalente en el proxy de confianza, CDN, balanceador de carga, cortafuegos u otra capa perimetral antes de que el tráfico llegue a Caddy. Las implementaciones donde Caddy recibe tráfico directamente de los clientes, sin un proxy de confianza intermedio, no se ven afectadas por esta elusión.","source":"nvd"}],"published":"2026-05-19T20:29:14.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-284","CWE-348"],"affected":[{"ranges":[{"version":"< 0.10.1","status":"affected"}],"vendor":"JasonLovesDoggo","product":"caddy-defender","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.1"}],"ecosystem":"Go","package":"pkg.jsn.cam/caddy-defender","purl":"pkg:golang/pkg.jsn.cam/caddy-defender","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.1"}],"ecosystem":"Go","package":"pkg.jsn.cam/caddy-defender","purl":"pkg:golang/pkg.jsn.cam/caddy-defender","source":"go"}],"references":[{"url":"https://github.com/JasonLovesDoggo/caddy-defender/security/advisories/GHSA-3h23-rrpc-3p87","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/JasonLovesDoggo/caddy-defender/pull/139","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://caddyserver.com/docs/caddyfile/matchers#client-ip","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://caddyserver.com/docs/caddyfile/options#trusted-proxies","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/JasonLovesDoggo/caddy-defender","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-21T13:52:55.935Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46415","url":"https://www.cve.org/CVERecord?id=CVE-2026-46415","licence":"CVE Terms of Use","modified":"2026-07-21T13:53:08.959Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3h23-rrpc-3p87","url":"https://github.com/advisories/GHSA-3h23-rrpc-3p87","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:31.224Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5086","url":"https://pkg.go.dev/vuln/GO-2026-5086","licence":"CC-BY-4.0","modified":"2026-06-25T18:45:19.528Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46415","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46415","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:29.239Z","epss":{"score":0.0016,"percentile":0.05463,"date":"2026-12-01T12:00:22.000Z"}}