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

> Attackers can spoof IP addresses via headers in chi's RealIP middleware to bypass access controls and rate limits if trusted proxies are not configured.

- **Severity:** Medium 6.9 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Aug 2026
- **Updated:** 8 Oct 2026
- **Also known as:** AZL-96635, AZL-96689, CLEANSTART-2026-LL29921, CLEANSTART-2026-RS34539, CLEANSTART-2026-UC45945, DEBIAN-CVE-2026-72816, GHSA-rjr7-jggh-pgcp, GHSA-xg24-pmhh-m4m9, GO-2026-5777, MINI-23c8-j6rf-8pj9, MINI-2974-5f45-h5h3, MINI-2mw4-q48f-xw9m, MINI-2pff-qcwv-3q8v, MINI-2q99-cmm7-r8j8, MINI-34qj-r942-rwr6, MINI-37wf-7xwq-qr69, MINI-38pv-3jr6-jjc6, MINI-3mxr-j99v-333j, MINI-3q4w-r8g4-q63g, MINI-438q-xf9g-m2xf, MINI-4fxg-77w6-f57c, MINI-5f3x-jr3g-73qj, MINI-5mvv-92p4-25qp, MINI-5qqg-f2m8-whpc, MINI-5rg3-x6qg-qgvw, MINI-5wm6-8wfh-jj6r, MINI-64jj-7jw8-9x3m, MINI-6fxf-78g6-3wf6, MINI-6wh8-4j9g-wrx7, MINI-6x57-4669-97h7, MINI-7354-2gfc-w5hg, MINI-77cj-6542-q24g, MINI-7c2f-9wvc-rw7x, MINI-7g4j-4f9g-hmfj, MINI-8gwq-f379-ffqm, MINI-8p29-gjvr-9p2x, MINI-8r34-c3q6-f6fj, MINI-92pv-4qv5-xmj9, MINI-9579-32wj-q3c9, MINI-99hc-8fcp-9hf4, MINI-cc9x-2qxw-w5q8, MINI-cfvv-ph5j-mrv8, MINI-cv49-ffcj-wx7h, MINI-f4v2-fx9f-qf5m, MINI-fch2-mwp4-x69f, MINI-frx3-5jwr-g7x6, MINI-g2w3-5vmf-h3q5, MINI-g5fp-jw8v-wv5m, MINI-gmmq-hmwr-cvhw, MINI-gmwg-f3q4-h362, MINI-gr86-5p35-mcfw, MINI-gvf6-c4c5-x673, MINI-h576-mqg3-vq7w, MINI-h6j2-vvhf-pcmm, MINI-h8wh-x7gj-w89p, MINI-hhmv-vmqx-h7mc, MINI-hq39-2vwf-mrgr, MINI-hrvg-r88m-wgwc, MINI-hw42-cwgv-fcpc, MINI-j5q4-64gm-vh2x, MINI-jqhg-q3g2-9crj, MINI-jvgh-r54f-62jp, MINI-m2cc-3hm7-p8cg, MINI-m4mj-fghv-3ffv, MINI-m5wh-8hx9-256g, MINI-m95f-xx96-p83r, MINI-mc6c-8j38-4cg8, MINI-mc6q-436j-79m7, MINI-mcp7-vhqv-gqwg, MINI-mvjx-6j9p-24q7, MINI-p3v6-9fg6-crfw, MINI-p57q-j4v4-2rjc, MINI-p8ch-pr8h-78g5, MINI-pm9h-q7q4-2v92, MINI-prm7-v7x4-x54w, MINI-pv4q-64vc-4r82, MINI-pv54-4wm5-cgw3, MINI-q4m2-9xhc-5px2, MINI-q66x-2j94-rr2f, MINI-qc8p-p93f-m553, MINI-qfrx-38vr-h42r, MINI-qhc4-qcxv-hf4c, MINI-qppf-3pq3-jm5h, MINI-qq38-87wp-jhvr, MINI-qq7g-284v-rg9h, MINI-qwxx-4pv3-qv3j, MINI-r3m7-4cp8-vmjh, MINI-r59r-5h88-f94m, MINI-rf36-mmpg-3pvx, MINI-rj7v-gj3w-f372, MINI-rmv5-h5wh-jc3c, MINI-v25h-2jg3-6pxm, MINI-v34x-f8xr-gfvx, MINI-v5jg-fhvw-fv9p, MINI-v5vp-9j34-743p, MINI-v7hq-h6wq-rw85, MINI-v7ph-q75r-r779, MINI-v83v-2mmj-crr2, MINI-v85q-c8r3-6jvq, MINI-v8mf-vf77-phg4, MINI-vf59-f96w-vf6c, MINI-vj7p-fmhc-vf52, MINI-vqw3-3jj7-hvc8, MINI-w9hp-r54x-3mrf, MINI-wcfr-4m3v-9x35, MINI-wcp3-fwjx-42jj, MINI-wfcw-5xcw-xh5w, MINI-whvg-4g7r-f7j8, MINI-wp65-c5wf-76xr, MINI-wphx-h8q6-84xr, MINI-wq64-cmcc-hhm2, MINI-wrq7-pp5q-qc68, MINI-wx75-4hhv-5f66, MINI-wxp9-j4pg-mw27, MINI-x274-w9p4-9vf3, MINI-x5p4-v853-763c, MINI-x9r9-9prw-5jwp, MINI-xp44-fw39-w64r, MINI-xw7c-f2wq-mgg4, MINI-xx34-7wrf-9pjp, UBUNTU-CVE-2026-72816

## What is CVE-2026-72816?

CVE-2026-72816 is a medium-severity vulnerability in go-chi chi, published on 14 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-290 (Authentication Bypass by Spoofing)

## Which versions are affected by CVE-2026-72816?

11 open source packages ship an affected version, including github.com/go-chi/chi/middleware, github.com/go-chi/chi/v2/middleware and github.com/go-chi/chi/v3/middleware.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-chi/chi/middleware` | Go | All versions to 1.5.5 | None |
| `github.com/go-chi/chi/middleware` | Go | All versions to 1.5.5 | None |
| `github.com/go-chi/chi/v2/middleware` | Go | All versions to 2.1.1 | None |
| `github.com/go-chi/chi/v2/middleware` | Go | All versions to 2.1.1 | None |
| `github.com/go-chi/chi/v3/middleware` | Go | All versions to 3.3.5 | None |
| `github.com/go-chi/chi/v3/middleware` | Go | All versions to 3.3.5 | None |
| `github.com/go-chi/chi/v4/middleware` | Go | All versions to 4.1.3 | None |
| `github.com/go-chi/chi/v4/middleware` | Go | All versions to 4.1.3 | None |
| `github.com/go-chi/chi/v5` | Go | All versions | 5.3.0 |
| `github.com/go-chi/chi/v5/middleware` | Go | All versions | 5.3.0 |
| `github.com/go-chi/chi/v5/middleware` | Go | All versions | 5.3.0 |

## How do I fix CVE-2026-72816?

Upgrade to a fixed version.

## Is CVE-2026-72816 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-72816 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-72816 and fix it if it is affected.

What it is: CVE-2026-72816 is a medium-severity vulnerability in go-chi chi, published on 14 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-72816 exists.

Affected packages and fixed versions:
- github.com/go-chi/chi/middleware (Go): affected all versions up to 1.5.5; no fix listed
- github.com/go-chi/chi/middleware (Go): affected all versions up to 1.5.5; no fix listed
- github.com/go-chi/chi/v2/middleware (Go): affected all versions up to 2.1.1; no fix listed
- github.com/go-chi/chi/v2/middleware (Go): affected all versions up to 2.1.1; no fix listed
- github.com/go-chi/chi/v3/middleware (Go): affected all versions up to 3.3.5; no fix listed
- github.com/go-chi/chi/v3/middleware (Go): affected all versions up to 3.3.5; no fix listed
- github.com/go-chi/chi/v4/middleware (Go): affected all versions up to 4.1.3; no fix listed
- github.com/go-chi/chi/v4/middleware (Go): affected all versions up to 4.1.3; no fix listed
- github.com/go-chi/chi/v5 (Go): affected all versions; fixed in 5.3.0
- github.com/go-chi/chi/v5/middleware (Go): affected all versions; fixed in 5.3.0
- github.com/go-chi/chi/v5/middleware (Go): affected all versions; fixed in 5.3.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-72816/ (Markdown: https://insights.sbomify.com/CVE-2026-72816/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-72816
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-72816
- OSV: https://osv.dev/vulnerability/CVE-2026-72816

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-72816/
Summaries are generated and may contain mistakes; the official description above is the record.
