Skip to content
OpenAdvisories

Description

go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAddr without verifying that the request originated from a trusted proxy. Attackers can supply arbitrary IP addresses in these headers to bypass IP-based access controls, evade rate limiting and geo-IP restrictions, and pollute audit logs. Fixed in 5.3.0.

Affected products

VendorProductAffectedFixed
go-chi chi < 5.3.0 5.3.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-go-chi-chi 5.3.0-1 —
Debian 13 golang-github-go-chi-chi No fix yet —
Debian 12 golang-github-go-chi-chi No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS golang-github-go-chi-chi No fix yet —
Ubuntu 24.04 LTS golang-github-go-chi-chi No fix yet —
Ubuntu 22.04 LTS golang-github-go-chi-chi No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 cosign 3.1.3-0.1.hum1 RHSA-2026:54420
Red Hat Hardened Images 1 spire1.14 +3 1.14.7-0.4.hum1 RHSA-2026:49718
Red Hat Hardened Images 1 spire1.15 +3 1.15.2-0.4.hum1 RHSA-2026:49732
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 cloudflared 2026.8.2-bp160.1.1 openSUSE-SU-2026:21670-1
openSUSE Leap 16.0 hauler 2.1.0-bp160.1.1 openSUSE-SU-2026:21793-1
openSUSE Leap 16.0 trivy 0.74.0-160000.1.1 openSUSE-SU-2026:21645-1
openSUSE Leap 16.0 v2ray-core 5.53.0-bp160.1.1 openSUSE-SU-2026:21653-1
openSUSE Leap 16.0 warewulf4 4.7.1-bp160.1.1 openSUSE-SU-2026:21918-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 gh 2.97.0-1 —
Azure Linux 3 influxdb No fix yet —

Affected packages

Advisories 8

References