Description
In the Golang Chi web framework, the ClientIPFromXFF middleware skips any X-Forwarded-For entry in a configured trusted CIDR but never verifies that the direct TCP peer in http.Request.RemoteAddr belongs to that CIDR. A client that can reach the Go server directly can therefore append a trusted-looking proxy address and choose the client IP returned by middleware.GetClientIP.

This issue affects chi before 5.4.0.
Published: 2026-10-21
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: Client IP Spoofing
Action: Patch
AI Analysis

Impact

The Golang Chi web framework’s ClientIPFromXFF middleware allows an attacker who can connect directly to the Go server to insert a trusted‑looking proxy address into the X‑Forwarded‑For header, causing the middleware to report that address as the client IP. This flaw stems from an oversight where the remote TCP peer is not validated against the configured trusted CIDR, enabling IP spoofing that can subvert IP‑based access controls, logging, rate limiting, and audit trails. The weakness is classified as CWE‑348.

Affected Systems

All releases of the go‑chi:chi library before version 5.4.0 are affected, because the vulnerability originates in the ClientIPFromXFF middleware code prior to that patch level.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.3, indicating moderate severity. No EPSS data is available, and it is not listed in the CISA KEV catalog. The required attack vector demands network connectivity to the server; once established, manipulating the X‑Forwarded‑For header is straightforward. This flaw enables an attacker to override the reported client IP, potentially bypassing IP‑based controls or compromising audit information.

Generated by OpenCVE AI on October 22, 2026 at 00:53 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade go‑chi to version 5.4.0 or newer to apply the vendor patch.
  • If an upgrade is not immediately possible, enforce that the X‑Forwarded‑For header is accepted only when http.Request.RemoteAddr falls within the configured trusted CIDR by adding a custom validation or disabling the ClientIPFromXFF middleware during the interim period.
  • Limit direct inbound connections to the application, for example by placing a reverse proxy in front of the Go server that strips or validates the X‑Forwarded‑For header, or by configuring firewall rules to allow traffic only from known internal proxies.

Generated by OpenCVE AI on October 22, 2026 at 00:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 22 Oct 2026 01:00:00 +0000

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

Wed, 21 Oct 2026 14:00:00 +0000

Type Values Removed Values Added
Description In the Golang Chi web framework, the ClientIPFromXFF middleware skips any X-Forwarded-For entry in a configured trusted CIDR but never verifies that the direct TCP peer in http.Request.RemoteAddr belongs to that CIDR. A client that can reach the Go server directly can therefore append a trusted-looking proxy address and choose the client IP returned by middleware.GetClientIP. This issue affects chi before 5.4.0.
Title Chi Client IP Spoofing in ClientIPFromXFF via X-Forwarded-For
Weaknesses CWE-348
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: tenable

Published:

Updated: 2026-10-21T17:19:13.809Z

Reserved: 2026-10-21T13:42:40.246Z

Link: CVE-2026-114437

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-21T14:17:14.690

Modified: 2026-10-21T18:17:27.563

Link: CVE-2026-114437

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T01:00:18Z

Weaknesses
  • CWE-348

    Use of Less Trusted Source