CVE-2026-72816
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.
- CVSS 4.0
- 6.9
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - EPSS
- 0.3% chance of exploitation in the next 30 days; higher than 22% of CVEs (scores of 2026-10-25)
- CWE
- CWE-290
- Published
- Modified
- Record from
- the NVD, synced
Packages (OSV)
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-rjr7-jggh-pgcp | Go | github.com/go-chi/chi/middleware | <=1.5.5 | no fix published |
| GHSA-rjr7-jggh-pgcp | Go | github.com/go-chi/chi/v2/middleware | <=2.1.1 | no fix published |
| GHSA-rjr7-jggh-pgcp | Go | github.com/go-chi/chi/v3/middleware | <=3.3.5 | no fix published |
| GHSA-rjr7-jggh-pgcp | Go | github.com/go-chi/chi/v4/middleware | <=4.1.3 | no fix published |
| GHSA-rjr7-jggh-pgcp | Go | github.com/go-chi/chi/v5/middleware | <5.3.0 | 5.3.0 |
| GO-2026-5777 | Go | github.com/go-chi/chi/v5 | <5.3.0 | 5.3.0 |