# CVE-2026-72815: GO-2026-5774 - Chi has an IP spoofing vulnerability in middleware.RealIP in github.com/go-chi/chi

Source: https://junglewise.ai/threats/cve-2026-72815-chi-has-an-ip-spoofing-vulnerability-in-middleware-realip  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-14  
License: CC BY 4.0 with a link back

CVE-2026-72815 · Severity: medium · CVSS 4 · Published 2026-08-14

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.

Technologies: [github.com/go-chi/chi/v5 (Go)](https://junglewise.ai/threats/technologies/github-com-go-chi-chi-v5), [github.com/go-chi/chi/v5/middleware (Go)](https://junglewise.ai/threats/technologies/github-com-go-chi-chi-v5-middleware). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-72815 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-72815 being exploited in the wild.

**How severe is CVE-2026-72815?** Medium severity, with a CVSS score of 4, published 14 August 2026.

**Which products and versions are affected?** github.com/go-chi/chi/v5 (Go) SEMVER:introduced=5.2.1,fixed=5.3.0; github.com/go-chi/chi/v5/middleware (Go) SEMVER:introduced=5.2.1,fixed=5.3.0.

**Is there a fix for CVE-2026-72815?** Yes. github.com/go-chi/chi/v5 (Go): upgrade to 5.3.0 or later; github.com/go-chi/chi/v5/middleware (Go): upgrade to 5.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-72815?** Check whether you run github.com/go-chi/chi/v5 (Go) or github.com/go-chi/chi/v5/middleware (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/go-chi/chi/v5 (Go): upgrade to 5.3.0 or later

  ```sh
  go get github.com/go-chi/chi/v5@v5.3.0
  ```

- github.com/go-chi/chi/v5/middleware (Go): upgrade to 5.3.0 or later

  ```sh
  go get github.com/go-chi/chi/v5/middleware@v5.3.0
  ```


## Affected products

- github.com/go-chi/chi/v5 (Go) SEMVER:introduced=5.2.1,fixed=5.3.0
- github.com/go-chi/chi/v5/middleware (Go) SEMVER:introduced=5.2.1,fixed=5.3.0

## Identifiers

- CVE-2026-72815
- GHSA-3fxj-6jh8-hvhx
- GO-2026-5774

## Related threats

- [Chi web framework client IP spoofing via X-Forwarded-For](https://junglewise.ai/threats/duplicate-advisory-chi-client-ip-spoofing-in-clientipfromxff-via-x-f73190e1)
- [Go Chi ClientIPFromXFF IP spoofing via X-Forwarded-For](https://junglewise.ai/threats/cve-2026-114437-in-the-golang-chi-web-framework-the-clientipfromxff-middleware)
- [GO-2026-5775 - Chi Middleware vulnerable to IP spoofing via X-Forwarded-For header in github.com/go-chi/chi](https://junglewise.ai/threats/cve-2026-72817-chi-middleware-vulnerable-to-potential-ip-spoofing-via-x)
- [GO-2026-5777 - Chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header in github.com/go-chi/chi](https://junglewise.ai/threats/cve-2026-72816-chi-s-realip-middleware-allows-ip-spoofing-via-unvalidated-x)
- [chi Allows Host Header Injection which Leads to Open Redirect in RedirectSlashes](https://junglewise.ai/threats/cve-2025-71405-chi-allows-host-header-injection-which-leads-to-open-redirect-in)
