Skip to main content
Vulnerability Database/CVE-2026-114437

CVE-2026-114437: Golang Chi Framework Auth Bypass Flaw

CVE-2026-114437 is an authentication bypass vulnerability in the Golang Chi web framework that allows attackers to manipulate client IP detection by spoofing trusted proxy addresses. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-114437 Overview

CVE-2026-114437 affects the Go chi web framework, specifically the ClientIPFromXFF middleware. The middleware trusts X-Forwarded-For (XFF) header entries that match a configured trusted CIDR range. However, it never confirms that the direct TCP peer in http.Request.RemoteAddr actually belongs to that trusted range. A client with direct network access to the Go server can craft an XFF header containing a trusted proxy address and control the client IP returned by middleware.GetClientIP. This issue affects chi releases prior to version 5.4.0 and is classified under CWE-348: Use of Less Trusted Source.

Critical Impact

Attackers can spoof client IP addresses, bypassing IP-based access controls, rate limiters, audit logging, and allowlists that depend on middleware.GetClientIP.

Affected Products

  • Go chi web framework versions prior to 5.4.0
  • Applications using the ClientIPFromXFF middleware with a configured trusted CIDR
  • Downstream services relying on middleware.GetClientIP for authorization or logging

Discovery Timeline

  • 2026-10-21 - CVE-2026-114437 published to NVD
  • 2026-10-21 - Last updated in NVD database

Technical Details for CVE-2026-114437

Vulnerability Analysis

The chi framework provides ClientIPFromXFF middleware to extract the real client IP when a service sits behind trusted reverse proxies. Operators configure one or more trusted CIDR ranges representing their proxy fleet. The middleware walks the X-Forwarded-For header from right to left, skipping any address that falls inside the trusted CIDR. The first non-trusted address is returned as the client IP.

The defect is that the middleware never checks whether the direct connection in http.Request.RemoteAddr originates from a trusted proxy. XFF headers only carry meaning when the request itself arrives from a trusted hop. Without that peer check, any client that can reach the server directly can inject arbitrary addresses into the header and dictate the result.

Root Cause

The root cause is a missing trust-boundary check on the TCP peer. The middleware treats the XFF chain as authoritative regardless of who sent the request. CWE-348 describes exactly this pattern: using a user-controllable source as if it were trusted. The trusted-CIDR configuration should gate both which XFF entries are skipped and whether the XFF header is honored at all.

Attack Vector

An attacker connects directly to the Go server over the network. They send a request with a crafted X-Forwarded-For header such as X-Forwarded-For: <attacker-chosen-ip>, <trusted-proxy-ip>. The middleware skips the trusted proxy entry and returns the attacker-chosen IP from middleware.GetClientIP. Any downstream handler that performs IP allowlisting, rate limiting, geo-restriction, abuse tracking, or audit logging will record or trust the spoofed value. Successful exploitation requires network reachability to the backend, which is why the attack complexity is rated higher than a pure network attack.

See the GitHub Security Advisory GHSA-j6qf-3m9c-vwj3 and Tenable Research Advisory TRA-2026-66 for additional technical analysis.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-114437

Indicators of Compromise

  • Requests arriving at the application where http.Request.RemoteAddr is outside the configured trusted CIDR but the X-Forwarded-For header still contains a trusted proxy address.
  • Audit logs showing authentication or privileged actions attributed to client IPs that have no corresponding entries in load balancer or reverse proxy access logs.
  • Rate limiter or abuse engine counters attributed to unexpected or geographically inconsistent IPs that do not appear in upstream proxy telemetry.

Detection Strategies

  • Correlate application-reported client IPs with reverse proxy and load balancer logs; flag mismatches where the application accepted an XFF value for a connection that never traversed a trusted proxy.
  • Inspect inbound traffic for X-Forwarded-For headers on direct connections to backend ports that should only be reached by trusted proxies.
  • Add runtime assertions in middleware pipelines that compare RemoteAddr to the trusted CIDR before honoring XFF.

Monitoring Recommendations

  • Alert when the backend application receives requests on exposed ports with any X-Forwarded-For header set.
  • Baseline the distribution of resolved client IPs and alert on sudden shifts toward addresses not represented in proxy logs.
  • Track Go module versions in build pipelines and surface deployments still running chi releases earlier than 5.4.0.

How to Mitigate CVE-2026-114437

Immediate Actions Required

  • Upgrade the github.com/go-chi/chi dependency to version 5.4.0 or later and redeploy affected services.
  • Ensure backend Go services are not directly reachable from untrusted networks; terminate client traffic exclusively at trusted proxies or load balancers.
  • Audit application code that calls middleware.GetClientIP and review any security decisions, including allowlists and rate limits, that depend on its output.

Patch Information

The maintainers fixed the issue in chi version 5.4.0. The patched middleware verifies that http.Request.RemoteAddr belongs to the configured trusted CIDR before honoring the X-Forwarded-For header. Review the GitHub Security Advisory GHSA-j6qf-3m9c-vwj3 for release details and the Tenable Research Advisory TRA-2026-66 for an independent write-up.

Workarounds

  • Configure the reverse proxy or load balancer to strip inbound X-Forwarded-For headers and append its own trusted value before forwarding to the backend.
  • Restrict network access to the Go backend so only trusted proxy IPs can establish TCP connections, enforced through firewall rules, security groups, or service mesh policies.
  • Implement a thin custom middleware that rejects or ignores X-Forwarded-For when http.Request.RemoteAddr is not inside the trusted CIDR until the upgrade is complete.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.