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

Published Aug 14, 2026
·
Updated

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.

Affected Software

1 affected component
go-chi/chi<=5.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go-chi/chi to a version that resolves this vulnerability.

    Fixed in 5.3.0
  2. Compensating control

    If upgrading is not immediately possible, configure your reverse proxy/load balancer so that only the proxy IPs are allowed to set or forward RealIP-related headers (True-Client-IP, X-Real-IP, X-Forwarded-For), and drop/ignore those headers from all other client traffic to prevent client-controlled header IP spoofing.

Event History

Aug 14, 2026
CVE Published
via MITRE·11:35 AM
Data Sourced
via MITRE·11:35 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-72816?

CVE-2026-72816 has a medium severity score of 6.5.

2

What type of vulnerability is CVE-2026-72816?

CVE-2026-72816 is an IP spoofing vulnerability caused by improper handling of client-controlled headers in the RealIP middleware.

3

How can I fix CVE-2026-72816?

To fix CVE-2026-72816, upgrade to go-chi/chi version 5.3.0 or later where the vulnerability has been addressed.

4

Who is affected by CVE-2026-72816?

CVE-2026-72816 affects users of go-chi/chi versions prior to 5.3.0 that utilize the RealIP middleware.

5

What header is exploited in CVE-2026-72816?

CVE-2026-72816 exploits headers like True-Client-IP, X-Real-IP, and X-Forwarded-For to manipulate the RemoteAddr field.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203