Skip to content

Commit d3114c8

Browse files
authored
Update module github.com/golang-jwt/jwt/v5 to v5.2.2 [SECURITY] (#4516)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golang-jwt/jwt/v5](https://redirect.github.com/golang-jwt/jwt) | `v5.2.1` -> `v5.2.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolang-jwt%2fjwt%2fv5/v5.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolang-jwt%2fjwt%2fv5/v5.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolang-jwt%2fjwt%2fv5/v5.2.1/v5.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolang-jwt%2fjwt%2fv5/v5.2.1/v5.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | ### GitHub Vulnerability Alerts #### [CVE-2025-30204](https://redirect.github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp) ### Summary Function [`parse.ParseUnverified`](https://redirect.github.com/golang-jwt/jwt/blob/c035977d9e11c351f4c05dfeae193923cbab49ee/parser.go#L138-L139) currently splits (via a call to [strings.Split](https://pkg.go.dev/strings#Split)) its argument (which is untrusted data) on periods. As a result, in the face of a malicious request whose _Authorization_ header consists of `Bearer ` followed by many period characters, a call to that function incurs allocations to the tune of O(n) bytes (where n stands for the length of the function's argument), with a constant factor of about 16. Relevant weakness: [CWE-405: Asymmetric Resource Consumption (Amplification)](https://cwe.mitre.org/data/definitions/405.html) ### Details See [`parse.ParseUnverified`](https://redirect.github.com/golang-jwt/jwt/blob/c035977d9e11c351f4c05dfeae193923cbab49ee/parser.go#L138-L139) ### Impact Excessive memory allocation --- ### Release Notes <details> <summary>golang-jwt/jwt (github.com/golang-jwt/jwt/v5)</summary> ### [`v5.2.2`](https://redirect.github.com/golang-jwt/jwt/releases/tag/v5.2.2) [Compare Source](https://redirect.github.com/golang-jwt/jwt/compare/v5.2.1...v5.2.2) #### What's Changed - Fixed GHSA-mh63-6h87-95cp by [@&#8203;mfridman](https://redirect.github.com/mfridman) - Fixed some typos by [@&#8203;Ashikpaul](https://redirect.github.com/Ashikpaul) in [https://github.com/golang-jwt/jwt/pull/382](https://redirect.github.com/golang-jwt/jwt/pull/382) - build: add go1.22 to ci workflows by [@&#8203;mfridman](https://redirect.github.com/mfridman) in [https://github.com/golang-jwt/jwt/pull/383](https://redirect.github.com/golang-jwt/jwt/pull/383) - Bump golangci/golangci-lint-action from 4 to 5 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/golang-jwt/jwt/pull/387](https://redirect.github.com/golang-jwt/jwt/pull/387) - Bump golangci/golangci-lint-action from 5 to 6 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/golang-jwt/jwt/pull/389](https://redirect.github.com/golang-jwt/jwt/pull/389) - chore: bump ci tests to include go1.23 by [@&#8203;mfridman](https://redirect.github.com/mfridman) in [https://github.com/golang-jwt/jwt/pull/405](https://redirect.github.com/golang-jwt/jwt/pull/405) - Fix jwt -show by [@&#8203;AlexanderYastrebov](https://redirect.github.com/AlexanderYastrebov) in [https://github.com/golang-jwt/jwt/pull/406](https://redirect.github.com/golang-jwt/jwt/pull/406) - docs: typo by [@&#8203;kvii](https://redirect.github.com/kvii) in [https://github.com/golang-jwt/jwt/pull/407](https://redirect.github.com/golang-jwt/jwt/pull/407) - Update SECURITY.md by [@&#8203;oxisto](https://redirect.github.com/oxisto) in [https://github.com/golang-jwt/jwt/pull/416](https://redirect.github.com/golang-jwt/jwt/pull/416) - Update `jwt.Parse` example to use `jwt.WithValidMethods` by [@&#8203;mattt](https://redirect.github.com/mattt) in [https://github.com/golang-jwt/jwt/pull/425](https://redirect.github.com/golang-jwt/jwt/pull/425) #### New Contributors - [@&#8203;Ashikpaul](https://redirect.github.com/Ashikpaul) made their first contribution in [https://github.com/golang-jwt/jwt/pull/382](https://redirect.github.com/golang-jwt/jwt/pull/382) - [@&#8203;kvii](https://redirect.github.com/kvii) made their first contribution in [https://github.com/golang-jwt/jwt/pull/407](https://redirect.github.com/golang-jwt/jwt/pull/407) - [@&#8203;mattt](https://redirect.github.com/mattt) made their first contribution in [https://github.com/golang-jwt/jwt/pull/425](https://redirect.github.com/golang-jwt/jwt/pull/425) **Full Changelog**: golang-jwt/jwt@v5.2.1...v5.2.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/cozy/cozy-stack). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2 parents 33bff9a + 327ab29 commit d3114c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/gavv/httpexpect/v2 v2.16.0
1818
github.com/go-viper/mapstructure/v2 v2.1.0
1919
github.com/gofrs/uuid/v5 v5.3.0
20-
github.com/golang-jwt/jwt/v5 v5.2.1
20+
github.com/golang-jwt/jwt/v5 v5.2.2
2121
github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f
2222
github.com/goodsign/monday v1.0.2
2323
github.com/google/go-querystring v1.1.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w
113113
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
114114
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
115115
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
116-
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
117-
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
116+
github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
117+
github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
118118
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
119119
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
120120
github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f h1:16RtHeWGkJMc80Etb8RPCcKevXGldr57+LOyZt8zOlg=

0 commit comments

Comments
 (0)