CVE-2023-29406 Insufficient sanitization of Host header in net/http
A malicious Host header in Go's net/http client can inject headers or requests, requiring an upgrade to the Go standard library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-29406?
CVE-2023-29406 is a medium-severity vulnerability in Golang Go, published on 11 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The HTTP/1 client does not fully validate the contents of the Host header. A maliciously crafted Host header can inject additional headers or entire requests. With fix, the HTTP/1 client now refuses to send requests containing an invalid Request.Host or Request.URL.Host value.
Weakness: CWE-436
Which versions are affected by CVE-2023-29406?
2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.19.11, 1.20.6 |
stdlib Go | All versions | 1.19.11, 1.20.6 |
Linux distribution packages (38)
aardvark-dns AlmaLinux:8 | All versions | 2:1.0.1-38.module_el8.9.0+3627+db8ec155 |
buildah AlmaLinux:8 | All versions | 1:1.24.6-7.module_el8.9.0+3627+db8ec155 |
buildah AlmaLinux:8 | All versions | 1:1.24.6-7.module_el8.9.0+3687+dcd7ef8f |
buildah-tests AlmaLinux:8 | All versions | 1:1.24.6-7.module_el8.9.0+3627+db8ec155 |
buildah-tests AlmaLinux:8 | All versions | 1:1.24.6-7.module_el8.9.0+3687+dcd7ef8f |
cockpit-podman AlmaLinux:8 | All versions | 46-1.module_el8.7.0+3344+5bcd850f |
conmon AlmaLinux:8 | All versions | 2:2.1.4-2.module_el8.9.0+3627+db8ec155 |
conmon AlmaLinux:8 | All versions | 2:2.1.4-2.module_el8.9.0+3687+dcd7ef8f |
container-selinux AlmaLinux:8 | All versions | 2:2.205.0-3.module_el8.9.0+3687+dcd7ef8f |
containernetworking-plugins AlmaLinux:8 | All versions | 1:1.1.1-5.module_el8.9.0+3627+db8ec155 |
containernetworking-plugins AlmaLinux:8 | All versions | 1:1.1.1-5.module_el8.9.0+3687+dcd7ef8f |
containers-common AlmaLinux:8 | All versions | 2:1-38.module_el8.9.0+3627+db8ec155 |
crit AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+2877+8e437bf5 |
crit AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+3137+d33c3efb |
criu AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+2877+8e437bf5 |
criu AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+3137+d33c3efb |
criu-devel AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+2877+8e437bf5 |
criu-devel AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+3137+d33c3efb |
criu-libs AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+2877+8e437bf5 |
criu-libs AlmaLinux:8 | All versions | 3.15-3.module_el8.6.0+3137+d33c3efb |
crun AlmaLinux:8 | All versions | 1.8.7-1.module_el8.9.0+3683+33eb0feb |
fuse-overlayfs AlmaLinux:8 | All versions | 1.9-2.module_el8.9.0+3627+db8ec155 |
fuse-overlayfs AlmaLinux:8 | All versions | 1.9-2.module_el8.9.0+3687+dcd7ef8f |
libslirp AlmaLinux:8 | All versions | 4.4.0-1.module_el8.6.0+2877+8e437bf5 |
libslirp AlmaLinux:8 | All versions | 4.4.0-1.module_el8.6.0+3137+d33c3efb |
libslirp-devel AlmaLinux:8 | All versions | 4.4.0-1.module_el8.6.0+2877+8e437bf5 |
libslirp-devel AlmaLinux:8 | All versions | 4.4.0-1.module_el8.6.0+3137+d33c3efb |
netavark AlmaLinux:8 | All versions | 2:1.0.1-38.module_el8.9.0+3627+db8ec155 |
oci-seccomp-bpf-hook AlmaLinux:8 | All versions | 1.2.5-2.module_el8.8.0+3468+16b86c82 |
podman AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
podman AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3687+dcd7ef8f |
podman-catatonit AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
podman-catatonit AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3687+dcd7ef8f |
podman-docker AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
podman-gvproxy AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
podman-gvproxy AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3687+dcd7ef8f |
podman-plugins AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
podman-remote AlmaLinux:8 | All versions | 2:4.0.2-24.module_el8.9.0+3627+db8ec155 |
Products include Golang Go.
How do I fix CVE-2023-29406?
Upgrade golang to a fixed version for your release line: 1.19.11 or 1.20.6.
Is CVE-2023-29406 being exploited?
There is no known exploitation of CVE-2023-29406 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as ALSA-2023:7202, AZL-27410, AZL-28831, AZL-37418, AZL-37420, AZL-52711 and 24 more.