CVE-2026-114437: chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
ClientIPFromXFF 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.
The attack is remote and requires one unauthenticated HTTP request with no user interaction (AV:N/AC:L/PR:N/UI:N). It changes security decisions and exposes one protected handler within the same application (S:U/C:L/I:L); no availability loss was observed (A:N).
Preconditions: The application uses ClientIPFromXFF and makes the origin server reachable by an anonymous client outside the configured trusted-proxy CIDRs. No victim interaction is required.
- Send
GET /admindirectly to the origin with noX-Forwarded-Forheader. - Observe a
403 Forbiddenresponse and an empty derived client IP. - Repeat the request with
X-Forwarded-For: 10.0.0.7, 198.51.100.42. - Observe
200 OKandclient-ip="10.0.0.7". Expected: the untrusted direct peer prevents the forwarding chain from being accepted.
References
- github.com/advisories/GHSA-j6qf-3m9c-vwj3
- github.com/go-chi/chi/commit/7f9b7448f51d28804fac98c0a17bc2a7cec1079f
- github.com/go-chi/chi/pull/1214
- github.com/go-chi/chi/releases/tag/v5.4.0
- github.com/go-chi/chi/security/advisories/GHSA-j6qf-3m9c-vwj3
- nvd.nist.gov/vuln/detail/CVE-2026-114437
- www.tenable.com/security/research/tra-2026-66
Code Behaviors & Features
Detect and mitigate CVE-2026-114437 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →