Description
get-jwks contains fetch utils for JWKS keys. In versions prior to 11.0.2, a vulnerability in get-jwks can lead to cache poisoning in the JWKS key-fetching mechanism. 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 targeted iss value. The vulnerability will work only if the iss validation is done after the use of get-jwks for keys retrieval. This issue has been patched in version 11.0.2.
EPSS Score:
0%
Comprehensive Technical Analysis of EUVD-2025-31349
1. Vulnerability Assessment and Severity Evaluation
Vulnerability Description:
The vulnerability in get-jwks versions prior to 11.0.2 involves a cache poisoning issue in the JWKS (JSON Web Key Set) key-fetching mechanism. The flaw arises because the issuer (iss) claim is validated after keys are retrieved from the cache, allowing cached keys from an unexpected issuer to be reused. This can lead to a bypass of issuer validation, enabling potential attacks where a malicious actor can craft JWTs (JSON Web Tokens) to exploit the cached keys.
Severity Evaluation:
The vulnerability has a CVSS (Common Vulnerability Scoring System) base score of 9.4, which is considered critical. The scoring vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L indicates:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): High (H)
- Integrity (I): High (H)
- Availability (A): Low (L)
This high severity score underscores the critical nature of the vulnerability, which can lead to significant impacts on confidentiality and integrity.
2. Potential Attack Vectors and Exploitation Methods
Attack Vectors:
- Cache Poisoning: An attacker can exploit the vulnerability by crafting a pair of JWTs. The first JWT ensures that a chosen public key is fetched and stored in the shared JWKS cache. The second JWT leverages that cached key to pass signature validation for a targeted issuer value.
- Issuer Validation Bypass: By manipulating the order of operations, the attacker can bypass the issuer validation, leading to unauthorized access or data manipulation.
Exploitation Methods:
- JWT Crafting: The attacker crafts JWTs with specific payloads to exploit the cache poisoning vulnerability.
- Network Interception: The attacker intercepts network traffic to inject malicious JWTs, exploiting the vulnerability in real-time.
3. Affected Systems and Software Versions
Affected Software:
get-jwksversions prior to 11.0.2
Affected Systems:
- Any system or application that uses
get-jwksfor JWKS key-fetching and JWT validation. - Systems that rely on JWTs for authentication and authorization, including web applications, APIs, and microservices.
4. Recommended Mitigation Strategies
Immediate Mitigation:
- Upgrade to Version 11.0.2: Upgrade
get-jwksto version 11.0.2 or later, which includes the patch for this vulnerability. - Temporary Workaround: Implement additional validation checks to ensure that the issuer claim is validated before keys are retrieved from the cache.
Long-Term Mitigation:
- Regular Security Audits: Conduct regular security audits and code reviews to identify and mitigate similar vulnerabilities.
- Monitoring and Logging: Implement robust monitoring and logging to detect and respond to any suspicious activities related to JWT validation.
- Security Best Practices: Follow best practices for JWT implementation, including proper key management and validation processes.
5. Impact on European Cybersecurity Landscape
Impact Analysis:
- Widespread Adoption: Given the widespread use of JWTs in modern web applications and APIs, this vulnerability poses a significant risk to the European cybersecurity landscape.
- Data Breaches: The vulnerability can lead to data breaches, unauthorized access, and potential data manipulation, impacting the confidentiality and integrity of sensitive information.
- Compliance Risks: Organizations may face compliance risks related to data protection regulations such as GDPR if sensitive data is compromised.
Regulatory Implications:
- GDPR Compliance: Organizations must ensure that they comply with GDPR requirements for data protection and breach notification.
- Incident Response: Organizations should have incident response plans in place to quickly address and mitigate any potential exploitation of this vulnerability.
6. Technical Details for Security Professionals
Technical Overview:
- JWKS Cache Mechanism: The vulnerability arises from the way
get-jwkshandles the JWKS cache. The issuer claim is validated after keys are retrieved from the cache, allowing for cache poisoning. - Exploitation Steps:
- The attacker crafts a JWT with a chosen public key and ensures it is stored in the JWKS cache.
- The attacker then crafts a second JWT leveraging the cached key to pass signature validation for a targeted issuer value.
- Patch Details: The patch in version 11.0.2 ensures that the issuer claim is validated before keys are retrieved from the cache, preventing cache poisoning.
References:
Conclusion:
The vulnerability in get-jwks versions prior to 11.0.2 is critical and requires immediate attention. Organizations should upgrade to the patched version and implement additional security measures to mitigate the risk. The European cybersecurity landscape must remain vigilant to such vulnerabilities to protect sensitive data and ensure compliance with regulatory requirements.