CVE-2026-52845: Caddy authentication bypass via FastCGI header normalization collision

CVE-2026-52845 · Severity: high · CVSS 8.1 · Published 2026-06-23

Caddy is a web server platform used to host websites and manage traffic. A security flaw in how it handles user identity information allows attackers to bypass authentication checks when Caddy is used with PHP applications. By sending specially crafted web requests, an attacker can trick the backend application into believing they have higher privileges or are a different user, potentially leading to unauthorized access to sensitive data or administrative functions.

Technologies: github.com/caddyserver/caddy (Go), github.com/caddyserver/caddy/v2 (Go). Vendors: Go.

Quick answers

Is CVE-2026-52845 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-52845 being exploited in the wild.
How severe is CVE-2026-52845?
High severity, with a CVSS score of 8.1, published 23 June 2026.
Which products and versions are affected?
github.com/caddyserver/caddy (Go) <= 1.0.5, SEMVER:introduced=0,last_affected=1.0.5; github.com/caddyserver/caddy/v2 (Go) < 2.11.4, SEMVER:introduced=0,fixed=2.11.4.
Is there a fix for CVE-2026-52845?
Yes. github.com/caddyserver/caddy/v2 (Go): upgrade to 2.11.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-52845 attacked?
It is attacked over the network, in a hosted service.
Am I affected by CVE-2026-52845?
Check whether you run github.com/caddyserver/caddy (Go) or github.com/caddyserver/caddy/v2 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/caddyserver/caddy/v2 (Go): upgrade to 2.11.4 or later
    go get github.com/caddyserver/caddy/v2@v2.11.4

Technical details

A vulnerability exists in Caddy's 'forward_auth' module when used in conjunction with 'php_fastcgi'. The 'copy_headers' directive attempts to sanitize the request by deleting client-supplied headers that match trusted identity headers (e.g., 'Remote-User') before replacing them with values from an auth gateway. However, Caddy's FastCGI implementation normalizes headers by replacing hyphens with underscores (e.g., 'Remote_User' becomes 'HTTP_REMOTE_USER'). An attacker can provide a header using underscores that bypasses the initial deletion step but is interpreted by the PHP backend as the trusted identity variable. This allows for header injection or overriding of group/user identity. The issue is fixed in version 2.11.4.

Affected products

  • Caddyserver Caddy < 2.11.4

Identifiers

  • CVE-2026-52845
  • GHSA-f59h-q822-g45g
  • GO-2026-5346

Timeline

  • 2026-06-08: advisory: GitHub advisory published by maintainers
  • 2026-06-23: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.