Update module github.com/go-chi/chi/v5 to v5.3.0 [SECURITY] - #75
Open
renovate[bot] wants to merge 1 commit into
Open
Update module github.com/go-chi/chi/v5 to v5.3.0 [SECURITY]#75renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
deleted the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
September 7, 2025 20:30
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
from
September 8, 2025 02:02
bb43fa0 to
2f3d3cd
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
December 10, 2025 12:34
2f3d3cd to
f617255
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
from
February 27, 2026 13:44
f617255 to
444f9fb
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
March 5, 2026 09:35
444f9fb to
5f8aeca
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
April 7, 2026 17:03
5f8aeca to
d821946
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
April 28, 2026 09:37
d821946 to
d59f277
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
June 1, 2026 19:00
d59f277 to
4da6878
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
June 3, 2026 09:52
4da6878 to
cbe6104
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
from
July 21, 2026 01:07
cbe6104 to
550f0bd
Compare
renovate
Bot
force-pushed
the
renovate/go-github.com-go-chi-chi-v5-vulnerability
branch
2 times, most recently
from
July 24, 2026 23:48
550f0bd to
c40a319
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
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.0.10→v5.3.0chi Allows Host Header Injection which Leads to Open Redirect in RedirectSlashes
GHSA-vrw8-fxc6-2r93 / GO-2025-3770
More information
Details
Summary
The RedirectSlashes function in middleware/strip.go is vulnerable to host header injection which leads to open redirect.
We consider this a lower-severity open redirect, as it can't be exploited from browsers or email clients (requires manipulation of a Host header).
Details
The RedirectSlashes method uses the Host header to construct the redirectURL at this line https://github.com/go-chi/chi/blob/master/middleware/strip.go#L55
The Host header can be manipulated by a user to be any arbitrary host. This leads to open redirect when using the RedirectSlashes middleware
PoC
Create a simple server which uses the RedirectSlashes middleware
Run the server
go run main.goOnce the server is running, send a request that will trigger the RedirectSlashes function with an arbitrary Host header
curl -iL -H "Host: example.com" http://localhost:8080/test/Observe that the request will be redirected to example.com
Without the host header, the response is returned from the test server
Impact
An open redirect vulnerability allows attackers to trick users into visiting malicious sites. This can lead to phishing attacks, credential theft, and malware distribution, as users trust the application’s domain while being redirected to harmful sites.
Potential mitigation
It seems that the purpose of the RedirectSlashes function is to redirect within the same application. In that case r.RequestURI can be used instead of r.Host by default. If there is a use case to redirect to a different host, a flag can be added to use the Host header instead. As this flag will be controlled by the developer they will make the decision of allowing redirects to arbitrary hosts based on their judgement.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Chi Middleware vulnerable to IP spoofing via X-Forwarded-For header in github.com/go-chi/chi
GHSA-9g5q-2w5x-hmxf / GO-2026-5775
More information
Details
Chi Middleware vulnerable to IP spoofing via X-Forwarded-For header in github.com/go-chi/chi
Severity
Unknown
References
This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).
Chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header in github.com/go-chi/chi
GHSA-rjr7-jggh-pgcp / GO-2026-5777
More information
Details
Chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header in github.com/go-chi/chi
Severity
Unknown
References
This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).
Release Notes
go-chi/chi (github.com/go-chi/chi/v5)
v5.3.0Compare Source
What's Changed
New Contributors
SECURITY: middleware.ClientIP, a replacement for middleware.RealIP
PR #967 introduced
middleware.ClientIP, a replacement formiddleware.RealIPthat closes the three open spoofing advisories:RemoteAddrresolution (convto)middleware.RealIP(Saku0512, Critical / 9.3)It also addresses issues outlined at:
middleware.RealIPis deprecated in this PR with pointers to the new API.The deprecation only adds a
// Deprecated:doc comment; the function keeps working for backward compatibility.Why a new middleware (not "fix RealIP in place")
RealIPhas two unfixable design choices: it mutatesr.RemoteAddr, and it tries to be a one-size-fits-all default by walking a hard-coded list of headers any client can supply. Per adam-p's "The perils of the 'real' client IP" (which calls chi out by name on this), there is no safe default — the user must pick their trust source explicitly.The new API
Four middlewares, two accessors. Pick exactly one middleware based on your
infrastructure, read the result with one of the two accessors:
Example usage:
And in your handler or downstream middleware:
Thanks to @adam-p, @c2h5oh, @rezmoss, @Saku0512, @convto, @Dirbaio, @jawnsy, @lrstanley, @mfridman, @n33pm, @pkieltyka for the prior discussions, detailed reviews, advisory reports, and test contributions that shaped this PR.
Full Changelog: go-chi/chi@v5.2.5...v5.3.0
v5.2.5Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.2.3...v5.2.5
v5.2.4Compare Source
v5.2.3Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.2.2...v5.2.3
v5.2.2Compare Source
What's Changed
Security fix
New Contributors
Full Changelog: go-chi/chi@v5.2.1...v5.2.2
v5.2.1Compare Source
Starting this release, we will now support the four most recent major versions of Go. See #963 for related discussion.
What's Changed
Full Changelog: go-chi/chi@v5.2.0...v5.2.1
v5.2.0Compare Source
What's Changed
FindtoRoutesinterface by @joeriddles in #872feat(): add CF-Connecting-IP by @n33pm in #908Revert "feat(): add CF-Connecting-IP" by @VojtechVitek in #966_examples/versionsby @hongkuancn in #948Mux.Findnot correctly handling nested routes by @joeriddles in #954New Contributors
Full Changelog: go-chi/chi@v5.1.0...v5.2.0
v5.1.0Compare Source
What's Changed
Discard()method to themiddleware.WrapResponseWriterinterface. This is technically an API breaking change. However after some discussion at #926 (comment), we decided to move forward, and release as minor version, as we don't expect anyone to rely on this interface / implement it externally.New Contributors
Full Changelog: go-chi/chi@v5.0.14...v5.1.0
v5.0.14Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.0.12...v5.0.14
v5.0.13Compare Source
What's Changed
New Contributors
Full Changelog: go-chi/chi@v5.0.12...v5.0.13
v5.0.12Compare Source
v5.0.11Compare Source
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.