Miggo Logo

CVE-2018-19148: Caddy allows enumeration of Certificates and Hostnames

3.7

CVSS Score
3.0

Basic Information

EPSS Score
0.38648%
Published
5/14/2022
Updated
4/24/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/caddyserver/caddygo< 0.11.10.11.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from Caddy's TLS handshake behavior when encountering unmatched Host headers. The key functions in caddytls/handshake.go: 1) getCertificate() previously selected a random certificate from a global cache when no SNI match was found, as shown by the commit diff removing 'default certificate' fallback logic. 2) getCertDuringHandshake() facilitated this by not properly restricting certificate selection. The patch introduced certificate cache restructuring and strict SNI matching, confirming these functions' role in the vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

****y t*rou** *.**.* s*n*s in*orr**t **rti*i**t*s *or **rt*in inv*li* r*qu*sts, m*kin* it **si*r *or *tt**k*rs to *num*r*t* *ostn*m*s. Sp**i*i**lly, w**n un**l* to m*t** * *ost *****r wit* * v*ost in its *on*i*ur*tion, it s*rv*s t** X.*** **rti*i**t*

Reasoning

T** vuln*r**ility st*mm** *rom ****y's TLS **n*s**k* ****vior w**n *n*ount*rin* unm*t**** *ost *****rs. T** k*y *un*tions in `****ytls/**n*s**k*.*o`: *) `**t**rti*i**t*()` pr*viously s*l**t** * r*n*om **rti*i**t* *rom * *lo**l ***** w**n no SNI m*t**