Description
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.
Published: 2026-08-14
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is in the RealIP middleware of the go-chi routing library. The middleware takes the first value of the X-Forwarded-For header as the client’s IP, without checking whether the header originates from a trusted proxy. A malicious user can prepend a forged IP address as the first list element, causing the framework to record the request as coming from that IP. This allows an attacker to make requests appear to originate from any address, potentially bypassing IP-based access controls and corrupting logs that rely on the remote address.

Affected Systems

The affected product is the go-chi HTTP routing library, known as chi, version 0.9.0 up to, but not including, 5.3.0. Any installation that uses the RealIP middleware while processing client requests is vulnerable.

Risk and Exploitability

The CVSS score of 6.9 places this vulnerability in the moderate range. EPSS is not available, meaning no exposure data is published yet. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the flaw by sending an HTTP request with a forged X-Forwarded-For header containing a spoofed IP address. Because the RealIP middleware lacks validation of trusted proxies, this can be done over both HTTP and HTTPS. The attack can result in IP spoofing, enabling bypass of IP-based security controls and falsifying audit logs.

Generated by OpenCVE AI on August 14, 2026 at 12:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade go-chi to version 5.3.0 or later, where the RealIP middleware considers trusted proxy lists.
  • If upgrading is not immediately possible, configure the RealIP middleware to enforce a whitelist of known proxy IP ranges, discarding any headers that do not originate from those proxies.
  • Add an additional layer of validation at the application level: verify that the X-Forwarded-For header originates from a trusted proxy or that the remote address matches expected patterns before using it for access decisions.

Generated by OpenCVE AI on August 14, 2026 at 12:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Go-chi
Go-chi chi
Vendors & Products Go-chi
Go-chi chi

Fri, 14 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Description 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.
Title go-chi chi 0.9.0 before 5.3.0 IP Spoofing via X-Forwarded-For
Weaknesses CWE-345
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}

cvssV4_0

{'score': 6.9, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T11:35:28.824Z

Reserved: 2026-08-10T15:12:16.754Z

Link: CVE-2026-72817

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-14T12:16:44.747

Modified: 2026-08-14T12:16:44.747

Link: CVE-2026-72817

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T13:00:11Z

Weaknesses
  • CWE-345

    Insufficient Verification of Data Authenticity