CVE-2026-72816
MEDIUM 6.9CVSS 4.0chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header
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.
- Published
- 14 Aug 2026
- Last modified
- 8 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Deferred
- Weakness
- CWE-290CWE-348
- Also known as
- GHSA-rjr7-jggh-pgcpGO-2026-5777
- Sources
- NVDJSONOSV GHSA-rjr7-jggh-pgcpJSONOSV GO-2026-5777JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | MEDIUM 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P | |
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Go | github.com/go-chi/chi/middleware | <= 1.5.5 | |
| OSV | Go | github.com/go-chi/chi/v2/middleware | <= 2.1.1 | |
| OSV | Go | github.com/go-chi/chi/v3/middleware | <= 3.3.5 | |
| OSV | Go | github.com/go-chi/chi/v4/middleware | <= 4.1.3 | |
| OSV | Go | github.com/go-chi/chi/v5/middleware | < 5.3.0 | 5.3.0 |
| OSV | Go | github.com/go-chi/chi/v5 | < 5.3.0 | 5.3.0 |
References
- https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp · WEB, ADVISORY
- https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-realip-middleware
- https://github.com/go-chi/chi · PACKAGE
- https://github.com/go-chi/chi/releases/tag/v5.3.0 · WEB
- https://github.com/go-chi/chi/pull/967 · FIX
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 14 Aug 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Jul 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 25 Jun 2026)