Repository navigation
chore(deps): update module github.com/go-chi/chi/v5 to v5.4.0 [security] (release-2.5) - #451
Open
crossplane-renovate[bot] wants to merge 1 commit into
Open
crossplane-renovate[bot] wants to merge 1 commit into
crossplane-renovate[bot] wants to merge 1 commit into
Conversation
crossplane-renovate
Bot
requested review from
a team and
tampakrap
as code owners
October 24, 2026 08:10
crossplane-renovate
Bot
requested review from
adamwg
and removed request for
a team
October 24, 2026 08:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v5.3.0→v5.4.0chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For
CVE-2026-114437 / GHSA-j6qf-3m9c-vwj3
More information
Details
Summary
ClientIPFromXFFskips anyX-Forwarded-Forentry in a configured trusted CIDR but never verifies that the direct TCP peer inhttp.Request.RemoteAddrbelongs 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 bymiddleware.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
ClientIPFromXFFand makes the origin server reachable by an anonymous client outside the configured trusted-proxy CIDRs. No victim interaction is required.GET /admindirectly to the origin with noX-Forwarded-Forheader.403 Forbiddenresponse and an empty derived client IP.X-Forwarded-For: 10.0.0.7, 198.51.100.42.200 OKandclient-ip="10.0.0.7". Expected: the untrusted direct peer prevents the forwarding chain from being accepted.Details
The vulnerable code is
ClientIPFromXFFinmiddleware/client_ip.go, lines 93-116 at the tested revision. It callswalkXFFwith only the attacker-controlled header, skips every entry that matches a trusted prefix, and stores the first remaining address:The function does not parse
r.RemoteAddrbefore this walk. Consequently, the configured CIDRs identify trusted strings insideX-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:
The no-header control was rejected:
Adding the forged chain authorized the same direct client:
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 allowlisted10.0.0.7. This changed the authorization decision from403 Forbiddento200 OKfor the protected handler.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
go-chi/chi (github.com/go-chi/chi/v5)
v5.4.0Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.3.2...v5.4.0
v5.3.2Compare Source
What's Changed
middleware.NewCompressor(level, "/*")never worked and silently compressed nothing. Instead of turning it into a compress-everything catch-all (as proposed in #868 and #1121), we decided to reject both "/" and "/*" at construction and panic. Compressing every response wastes CPU on already-compressed types (zip, jpeg, png), which is why the middleware keeps a curated default list. Users should pass explicit content types.Full Changelog: go-chi/chi@v5.3.1...v5.3.2
v5.3.1Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.3.0...v5.3.1
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.