Update dependency get-jwks to v11 [SECURITY] - #62
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
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:
^8.0.3→^11.0.0get-jwks: poisoned JWKS cache allows post-fetch issuer validation bypass
CVE-2025-59936 / GHSA-qc2q-qhf3-235m
More information
Details
Summary
A vulnerability in
get-jwkscan lead to cache poisoning in the JWKS key-fetching mechanism.Details
When the
iss(issuer) claim is validated only after keys are retrieved from the cache, it is possible for cached keys from an unexpected issuer to be reused, resulting in a bypass of issuer validation. This design flaw enables a potential attack where a malicious actor crafts a pair of JWTs, the first one ensuring that a chosen public key is fetched and stored in the shared JWKS cache, and the second one leveraging that cached key to pass signature validation for a targetedissvalue.The vulnerability will work only if the
issvalidation is done after the use ofget-jwksfor keys retrieval, which usually is the common case.PoC
Server code:
Exploit server that generates the JWT pair and send the public RSA key to the victim server:
The first JWT token will create a cache entry with the chosen public key and have the following format:
RS256:testkid:http://localhost:3001/?:https://example.comThe second JWT has a valid
iss, but will create the exact same cache key as the one before, leading to signature validation with the chosen public key, bypassing any futureissvalidations:RS256:testkid:http://localhost:3001/?:https://example.comImpact
Applications relying on
get-jwksfor key retrieval, even withissvalidation post-fetching, allows attackers to sign arbitrary payloads which will be accepted by the verifiers used.Solution
Escape each component used in the cache key, so delimiter collisions are impossible.
https://github.com/nearform/get-jwks/blob/57801368adf391a32040854863d81748d8ff97ed/src/get-jwks.js#L76
Severity
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nearform/get-jwks (get-jwks)
v11.0.2Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v11.0.1...v11.0.2
v11.0.1Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v11.0.0...v11.0.1
v11.0.0Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v10.0.0...v11.0.0
v10.0.0Compare Source
Breaking Changes
This version supports only Node.js 20+
What's Changed
Full Changelog: nearform/get-jwks@v9.0.2...v10.0.0
v9.0.2Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v9.0.1...v9.0.2
v9.0.1Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v9.0.0...v9.0.1
v9.0.0Compare Source
What's Changed
New Contributors
Full Changelog: nearform/get-jwks@v8.3.1...v9.0.0
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.