CVE-2026-72817: GO-2026-5775 - Chi Middleware vulnerable to IP spoofing via X-Forwarded-For header in github.com/go-chi/chi

CVE-2026-72817 · Severity: medium · CVSS 6.5 · Published 2026-08-14

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.

Technologies: github.com/go-chi/chi/v5 (Go), github.com/go-chi/chi/v5/middleware (Go). Vendors: Go.

Quick answers

Is CVE-2026-72817 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-72817 being exploited in the wild.
How severe is CVE-2026-72817?
Medium severity, with a CVSS score of 6.5, published 14 August 2026.
Which products and versions are affected?
github.com/go-chi/chi/middleware (Go) SEMVER:introduced=0.9.0,last_affected=1.5.5; github.com/go-chi/chi/v2/middleware (Go) SEMVER:introduced=0,last_affected=2.1.1; github.com/go-chi/chi/v3/middleware (Go) SEMVER:introduced=0,last_affected=3.3.5; github.com/go-chi/chi/v4/middleware (Go) SEMVER:introduced=0,last_affected=4.1.3; and 2 more.
Is there a fix for CVE-2026-72817?
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-72817?
Check whether you run github.com/go-chi/chi/middleware (Go), github.com/go-chi/chi/v2/middleware (Go), github.com/go-chi/chi/v3/middleware (Go) or one of the others listed 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
    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
    go get github.com/go-chi/chi/v5/middleware@v5.3.0

Affected products

  • github.com/go-chi/chi/middleware (Go) SEMVER:introduced=0.9.0,last_affected=1.5.5
  • github.com/go-chi/chi/v2/middleware (Go) SEMVER:introduced=0,last_affected=2.1.1
  • github.com/go-chi/chi/v3/middleware (Go) SEMVER:introduced=0,last_affected=3.3.5
  • github.com/go-chi/chi/v4/middleware (Go) SEMVER:introduced=0,last_affected=4.1.3
  • github.com/go-chi/chi/v5 (Go) SEMVER:introduced=0,fixed=5.3.0
  • github.com/go-chi/chi/v5/middleware (Go) SEMVER:introduced=0,fixed=5.3.0

Identifiers

  • CVE-2026-72817
  • GHSA-9g5q-2w5x-hmxf
  • GO-2026-5775

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.