Executive brief
A vulnerability in the 'jose' library, which is used to handle secure digital signatures and tokens, allows attackers to bypass security checks. By including their own encryption key within a token's header, an attacker can trick the system into accepting a forged token as legitimate. This could allow unauthorized users to impersonate others or gain access to protected data and services without valid credentials.
Technical details
A vulnerability exists in the 'jose' library (versions <= 0.3.5) due to improper verification of cryptographic signatures (CWE-347). The library's key selection logic in 'JsonWebKeyStore' treats a JSON Web Key (JWK) embedded in the JWS/JWT header as a valid verification candidate, even if that key is not in the application's trusted key store. An unauthenticated remote attacker can exploit this by generating a malicious token, embedding their own public key in the 'jwk' header field, and signing the token with their corresponding private key. The library will then use the attacker's provided key to "successfully" verify the signature, leading to a complete bypass of integrity protections. This issue is patched in version 0.3.5+1.
Affected products
- appsup-dart jose <= 0.3.5
Timeline
- 2026-03-31: disclosed
- 2026-03-31: advisory
- 2026-03-31: patched