# CVE-2026-72816: go-chi chi before 5.3.0 IP Spoofing via RealIP Middleware

- Severity: Medium 6.9 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-25T18:19:15.000Z
- Modified: 2026-10-08T16:17:35.783Z
- Also known as: GHSA-rjr7-jggh-pgcp, GO-2026-5777
- Related: CGA-3x7g-jp4q-h9fr
- Weaknesses: CWE-290, CWE-348
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- go-chi chi: before 5.3.0 (not affected: 5.3.0)
- github.com/go-chi/chi/middleware (Go): up to 1.5.5
- github.com/go-chi/chi/v2/middleware (Go): up to 2.1.1
- github.com/go-chi/chi/v3/middleware (Go): up to 3.3.5
- github.com/go-chi/chi/v4/middleware (Go): up to 4.1.3
- github.com/go-chi/chi/v5/middleware (Go): before 5.3.0
- github.com/go-chi/chi/v5 (Go): before 5.3.0

## Every score

- VulnCheck: CVSS:4.0 6.9 Medium `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`
- VulnCheck: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp> (exploit, advisory, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-realip-middleware> (third-party-advisory)
- <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)

## Sources

- CVE List: [CVE-2026-72816](https://www.cve.org/CVERecord?id=CVE-2026-72816), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-rjr7-jggh-pgcp](https://github.com/advisories/GHSA-rjr7-jggh-pgcp), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2026-5777](https://pkg.go.dev/vuln/GO-2026-5777), CC-BY-4.0, modified 2026-08-15
- NVD: [CVE-2026-72816](https://nvd.nist.gov/vuln/detail/CVE-2026-72816), Public domain, modified 2026-10-08

---

Page: https://cve.day/CVE-2026-72816 · Whole record: https://cve.day/CVE-2026-72816.json · Rebuilt by cve.day 2026-11-25T22:59:32.902Z
