Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/micahparks/jwkset to v0.6.0 [security] #2563

Merged

Conversation

trap-renovate[bot]
Copy link
Contributor

@trap-renovate trap-renovate bot commented Jan 9, 2025

This PR contains the following updates:

Package Type Update Change
github.com/MicahParks/jwkset require minor v0.5.20 -> v0.6.0

GitHub Vulnerability Alerts

CVE-2025-22149

Impact

The project's provided HTTP client's local JWK Set cache should do a full replacement when the goroutine refreshes the remote JWK Set. The current behavior is to overwrite or append. This is a security issue for use cases that utilize the provided auto-caching HTTP client and where key removal from a JWK Set is equivalent to revocation.

Example attack scenario:

  1. An attacker has stolen the private key for a key published in JWK Set.
  2. The publishers of that JWK Set remove that key from the JWK Set.
  3. Enough time has passed that the program using the auto-caching HTTP client found in github.com/MicahParks/jwkset v0.5.0-v0.5.21 has elapsed its HTTPClientStorageOptions.RefreshInterval duration, causing a refresh of the remote JWK Set.
  4. The attacker is signing content (such as JWTs) with the stolen private key and the system has no other forms of revocation.

Patches

The affected auto-caching HTTP client was added in version v0.5.0 and fixed in v0.6.0. Upgrade to v0.6.0 or later.

Workarounds

The only workaround would be to remove the provided auto-caching HTTP client and replace it with a custom implementation. This involves setting the HTTPClientStorageOptions.RefreshInterval to zero (or not specifying the value). Upgrade to v0.6.0 is advised.

References

Please see the tracking issue on GitHub for additional details: https://github.com/MicahParks/jwkset/issues/40


Release Notes

MicahParks/jwkset (github.com/MicahParks/jwkset)

v0.6.0

Compare Source

The purpose of this release is to fix a bug pointed out by @​rohitkoul in https://github.com/MicahParks/jwkset/pull/7#discussion_r1907816656. There is a bug in the refresh goroutine related to key replacement.

The project's provided HTTP client's local JWK Set cache should do a full replacement when the goroutine refreshes the remote JWK Set. The current behavior is to overwrite or append. This is a security issue for use cases that utilize the provided auto-caching HTTP client and where key removal from a JWK Set is equivalent to revocation.

Regardless of this bug, please note that removing a key from a JWK Set does not equate to instant revocation for most use cases as it takes time for JWK Set updates to propagate to all clients.

Relevant issues:

Relevant pull requests:

v0.5.21

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@trap-renovate trap-renovate bot added renovate/gomod (Renovate) Pull requests related to go.mod update type/minor (Renovate) Pull requests that update minor version labels Jan 9, 2025
@trap-renovate trap-renovate bot enabled auto-merge (squash) January 9, 2025 20:20
Copy link
Contributor Author

trap-renovate bot commented Jan 9, 2025

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.

@trap-renovate trap-renovate bot merged commit 2628a85 into master Jan 9, 2025
4 checks passed
@trap-renovate trap-renovate bot deleted the renovate/go-github.com-micahparks-jwkset-vulnerability branch January 9, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
renovate/gomod (Renovate) Pull requests related to go.mod update type/minor (Renovate) Pull requests that update minor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants