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: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Weakness in the RealIP middleware is identified as a CWE-345 and CWE-501 flaw. It processes the first IP address listed in the X-Forwarded-For header as the client’s source IP without validating that the header originates from a trusted proxy. An attacker can prepend a forged IP address as the first value, making the system believe the request came from that address. This enables IP spoofing, which can be used to bypass IP‑based access restrictions, impersonate another client, or falsify logs that rely on the remote address.

Affected Systems

The vulnerable product is the go‑chi routing library, known as chi, in versions 0.9.0 up to but not including 5.3.0. Any installation that employs the RealIP middleware to resolve upstream client addresses is affected.

Risk and Exploitability

Based on the CVSS score of 6.9, the vulnerability falls into the moderate range of severity. The EPSS score of <1% indicates a very low probability of exploitation in the general population, and it is not listed in the CISA KEV catalog. The likely attack vector is an HTTP or HTTPS request with a crafted X-Forwarded-For header containing a spoofed IP address; the attacker need only send this request to a system that uses the RealIP middleware without a trusted‑proxy whitelist.

Generated by OpenCVE AI on August 22, 2026 at 10:56 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 22, 2026 at 10:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 19 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-501
References
Metrics threat_severity

None

threat_severity

Moderate


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-17T16:09:15.028Z

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-17T16:17:45.103

Link: CVE-2026-72817

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-14T11:35:28Z

Links: CVE-2026-72817 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T11:00:04Z

Weaknesses
  • CWE-345

    Insufficient Verification of Data Authenticity

  • CWE-501

    Trust Boundary Violation