fix: upgrade deprecated JWT and JOSE libraries (CVE-2024-51744)#1670
fix: upgrade deprecated JWT and JOSE libraries (CVE-2024-51744)#1670rohilsurana wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR updates Go module dependencies in ChangesDependency Version Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 26899180527Coverage remained the same at 43.153%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
ecaa4d0 to
c81ea47
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c02ffeb4-1609-4b66-b239-70f9bbd834cc
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (1)
go.mod
| github.com/ghodss/yaml v1.0.0 | ||
| github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 | ||
| github.com/go-webauthn/webauthn v0.8.6 | ||
| github.com/go-webauthn/webauthn v0.11.2 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify CVE-2024-51744 fix and check for security advisories
echo "=== Checking CVE-2024-51744 fix version ==="
gh api graphql -f query='
{
securityVulnerabilities(first: 10, ecosystem: GO, package: "github.com/golang-jwt/jwt/v5") {
nodes {
advisory {
summary
severity
publishedAt
identifiers {
type
value
}
}
vulnerableVersionRange
firstPatchedVersion {
identifier
}
}
}
}'
echo -e "\n=== Checking for advisories on upgraded packages ==="
for pkg in "github.com/go-webauthn/webauthn" "github.com/lestrrat-go/jwx/v2" "github.com/oauth2-proxy/mockoidc"; do
echo "Checking $pkg..."
gh api graphql -f query="
{
securityVulnerabilities(first: 5, ecosystem: GO, package: \"$pkg\") {
nodes {
advisory {
summary
severity
publishedAt
}
vulnerableVersionRange
firstPatchedVersion {
identifier
}
}
}
}"
doneRepository: raystack/frontier
Length of output: 1786
🏁 Script executed:
#!/bin/bash
# Check for breaking changes in webauthn v0.8.6 -> v0.11.2
echo "=== Searching for webauthn release notes and breaking changes ==="
echo "Checking v0.9.0, v0.10.0, v0.11.0, v0.11.2 release notes..."
for version in v0.9.0 v0.10.0 v0.11.0 v0.11.2; do
echo -e "\n--- Release $version ---"
gh api repos/go-webauthn/webauthn/releases/tags/$version --jq '.body' 2>/dev/null || echo "Release notes not found"
doneRepository: raystack/frontier
Length of output: 7492
🌐 Web query:
What is the latest stable version of github.com/go-webauthn/webauthn, github.com/lestrrat-go/jwx/v2, and github.com/golang-jwt/jwt/v5?
💡 Result:
As of June 3, 2026, the latest stable versions for the requested Go modules are as follows: - github.com/go-webauthn/webauthn: The latest stable version is v0.17.4 [1]. - github.com/lestrrat-go/jwx/v2: The latest stable version is v2.1.6 [2][3]. - github.com/golang-jwt/jwt/v5: The latest stable version is v5.3.1 [4][5][6].
Citations:
- 1: https://pkg.go.dev/github.com/go-webauthn/webauthn
- 2: https://pkg.go.dev/github.com/lestrrat-go/jwx/v2@v2.1.6
- 3: https://pkg.go.dev/github.com/lestrrat-go/jwx/v2
- 4: https://github.com/golang-jwt/jwt/releases/tag/v5.3.1
- 5: https://pkg.go.dev/github.com/golang-jwt/jwt/v5@v5.3.1
- 6: https://pkg.go.dev/github.com/golang-jwt/jwt/v5
Fix CVE claim and re-check webauthn breaking-change compatibility for the go.mod upgrades
- CVE-2024-51744 / jwt/v5: security advisory data for
github.com/golang-jwt/jwt/v5returned no entries for CVE-2024-51744 (it only surfaced CVE-2025-30204, patched in 5.2.2), so the “fixed by v5.3.1” claim isn’t supported by the advisory results. - webauthn breaking changes (upgrade to
github.com/go-webauthn/webauthn v0.11.2):v0.11.0release notes list multiple BREAKING CHANGES (including removal ofWebAuthnIconfrom theUserinterface, removal ofConfigfields likeRPIcon/RPOrigin/Timeout, removal ofTransports, stricterCredentialFlagsBE/BS validation, metadata rework, and default modality behavior changes). The repo should be checked against these specific API changes. - Security patch currency:
github.com/go-webauthn/webauthnlatest stable is v0.17.4 (current is v0.11.2).jwx/v2andjwt/v5are already at latest stable (v2.1.6, v5.3.1). - Deprecated deps removal: ensure removal of deprecated
jwt/v3/go-jose.v2is complete beyond directgo.modrequires (e.g., viago mod tidy/ transitive graph checks), since current evidence only covers advisories and release notes.
Summary
github.com/oauth2-proxy/mockoidcto latest commit (2024-02-14) which migrated from deprecatedgithub.com/golang-jwt/jwtv3 and unmaintainedgopkg.in/square/go-jose.v2togithub.com/golang-jwt/jwt/v5andgithub.com/go-jose/go-jose/v3github.com/golang-jwt/jwt/v5from v5.0.0 to v5.3.1 (resolves CVE-2024-51744 audience claim validation bypass)github.com/lestrrat-go/jwx/v2from v2.0.21 to v2.1.6 (primary JWT library)github.com/go-webauthn/webauthnfrom v0.8.6 to v0.11.2Removed deprecated/unmaintained dependencies
github.com/golang-jwt/jwt v3.2.2+incompatible(deprecated v1/v3 with CVE-2024-51744)gopkg.in/square/go-jose.v2 v2.6.0(unmaintained, replaced bygo-jose/go-jose/v3)Test plan
go build ./...passesgo vet ./...passesgo test ./core/...passesgo test ./internal/...passesgo mod tidyproduces clean state