Caddy allows enumeration of Certificates and Hostnames
Published 14 May 2022 · Updated 24 Apr 2024
Is your project on an affected github.com/caddyserver/caddy?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <0.11.1
- Fixed in
- 0.11.1
go get github.com/caddyserver/caddy@v0.11.1Details
Caddy through 0.11.0 sends incorrect certificates for certain invalid requests, making it easier for attackers to enumerate hostnames. Specifically, when unable to match a Host header with a vhost in its configuration, it serves the X.509 certificate for a randomly selected vhost in its configuration. Repeated requests (with a nonexistent hostname in the Host header) permit full enumeration of all certificates on the server. This generally permits an attacker to easily and accurately discover the existence of and relationships among hostnames that weren't meant to be public, though this information could likely have been discovered via other methods with additional effort.
Is GHSA-jf2w-mq6r-56v8 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/caddyserver/caddy, and gives you the command that fixes it.
More advisories for github.com/caddyserver/caddy
- MediumCVE-2026-52846Caddy: stripHTML template function bypass · 16 Jun 2026
- HighCVE-2026-52845Caddy: FastCGI header normalization bypass in `forward_auth copy_headers` · 16 Jun 2026
- HighCVE-2026-52844Caddy: Windows `file_server` path authorization bypass via encoded backslash · 16 Jun 2026
- CriticalCVE-2018-21246Caddy vulnerable to Authentication Bypass due to mishandling of TLS client authentication · 6 Oct 2022
- MediumCVE-2022-29718Open redirect in caddy · 3 Jun 2022
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2018-19148
- Linkgithub.com/mholt/caddy/issues/1303
- Linkgithub.com/mholt/caddy/issues/2334
- Linkgithub.com/mholt/caddy/pull/2015
- Linkgithub.com/caddyserver/caddy/commit/986d4ffe3de32dcb81d334d603a2f0f1d460eb2f
- Linkgithub.com/caddyserver/caddy/commit/f6e50890b3d81cb04146bd7b2c2b59e99830849a
- Packagegithub.com/caddyserver/caddy
- Linksecuritytrails.com/blog/caddy-web-server-ssl-bug
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.