CVE-2026-72815
PoC largeIP spoofing in go-chi chi RealIP middleware enables ACL and rate-limit bypass
The Go HTTP router library go-chi (chi) versions 5.2.1 through versions before 5.3.0 ship a RealIP middleware that blindly trusts the first (leftmost) entry of the client-supplied X-Forwarded-For header when determining the client IP address. A remote attacker sends a request with an attacker-chosen X-Forwarded-For value, causing the application to treat the connection as coming from a different IP than the real one. This lets the attacker bypass IP-based access control lists and per-IP rate limiting, and forge log entries that can hide malicious activity. Only Go applications built with chi 5.2.1-5.2.x that enable the RealIP middleware (typically those deployed behind a reverse proxy or load balancer) are affected. Exploitation has not been confirmed in the wild: a public proof-of-concept exists, and EPSS estimates only about a 0.4% probability of exploitation in the next 30 days.
What to do: Upgrade chi to v5.3.0 or later. As a workaround, ensure your edge reverse proxy or load balancer overwrites (rather than appends to) the X-Forwarded-For header with the true client IP before requests reach the application. Audit any IP-based allowlists, denylists, and rate-limit rules, and review recent access logs for requests carrying forged X-Forwarded-For values.
| go-chi chi (RealIP middleware) | >= 5.2.1 and < 5.3.0 (fixed in 5.3.0) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-290
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.