Repository navigation
Update module github.com/go-chi/chi/v5 to v5.4.0 [SECURITY] (main) - #1935
renovate[bot] wants to merge 1 commit into
Conversation
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
|
<!-- fullsend:risk-assessment --> DetailsBot-authored security dependency update (go-chi/chi v5.4.0) touching only go.mod/go.sum files; DEPENDENCY_FILES_CHANGED and zero TEST_FILE_RATIO push Tier 1 to 2.13, expected renovation churn drives Tier 2 to 2.25, yielding a weighted composite of 0.62×2.13 + 0.38×2.25 ≈ 2.17 → 2, anchored to the prior moderate score with no changed signals. Previous run<!-- fullsend:risk-assessment --> DetailsBot-authored security dependency update (go-chi/chi v5.4.0) touching only go.mod/go.sum files across main and acceptance modules; the 4 dependency files score 5 on DEPENDENCY_FILES_CHANGED elevating Tier 1, but all other signals are low, and standard renovation churn on these files is expected, yielding a moderate composite of 1.66 (0.62×1.63 + 0.38×1.71 ≈ 2). |
|
Looks good to me <!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJmaW5kaW5ncyI6W119 --> Previous runLooks good to me Labels: Renovate bot dependency version bump updating Go module files. <!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJmaW5kaW5ncyI6W119 --> |
5477ee3 to
a19e28d
Compare
Superseded by updated review
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 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 was generated by Mend Renovate. View the repository job log.