Miggo Logo

CVE-2023-29406: The HTTP/1 client does not fully validate the contents of the Host header. A maliciously crafted...

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.33695%
Published
7/11/2023
Updated
11/25/2023
KEV Status
No
Technology
-

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability CVE-2023-29406 concerns the Go net/http client's failure to fully validate the Host header, allowing injection of headers or entire requests. I analyzed the information from https://pkg.go.dev/vuln/GO-2023-1878 and manually inspected the patch details from the Gerrit CL https://go-review.googlesource.com/c/go/+/506996/ (commit 236b1804397317a3ebf1d58394dfd69801900102). The patch introduces validation for Request.Host and Request.URL.Host in key functions responsible for writing and sending HTTP requests. The vulnerable functions are those that previously processed these fields without the now-added validation. Specifically, Request.Write and Request.WriteProxy are directly involved in serializing the request, including the Host header. Transport.roundTrip is the high-level function in the transport layer that orchestrates sending the request and now incorporates these checks. The absence of these checks in these functions prior to the patch constituted the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** *TTP/* *li*nt *o*s not *ully v*li**t* t** *ont*nts o* t** *ost *****r. * m*li*iously *r**t** *ost *****r **n inj**t ***ition*l *****rs or *ntir* r*qu*sts. Wit* *ix, t** *TTP/* *li*nt now r**us*s to s*n* r*qu*sts *ont*inin* *n inv*li* R*qu*st.*ost

Reasoning

T** vuln*r**ility *V*-****-***** *on**rns t** *o `n*t/*ttp` *li*nt's **ilur* to *ully v*li**t* t** `*ost` *****r, *llowin* inj**tion o* *****rs or *ntir* r*qu*sts. I *n*lyz** t** in*orm*tion *rom `*ttps://pk*.*o.**v/vuln/*O-****-****` *n* m*nu*lly in