jsonwebtoken is an implementation of JSON Web Tokens. Versions `<= 8.5.1` of `jsonwebtoken` library can be misconfigured so that passing a poorly implemented key retrieval function referring to the `secretOrPublicKey` argument from the readme link will result in incorrect verification of tokens. There is a possibility of using a different algorithm and key combination in verification, other than the one that was used to sign the tokens. Specifically, tokens signed with an asymmetric public key could be verified with a symmetric HS256 algorithm. This can lead to successful validation of forged tokens. If your application is supporting usage of both symmetric key and asymmetric key in jwt.verify() implementation with the same key retrieval function. This issue has been patched, please update to version 9.0.0.
History

No history.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published: 2022-12-22T17:52:22.173Z

Updated: 2024-08-03T03:43:46.445Z

Reserved: 2022-01-19T21:23:53.796Z

Link: CVE-2022-23541

cve-icon Vulnrichment

Updated: 2024-08-03T03:43:46.445Z

cve-icon NVD

Status : Modified

Published: 2022-12-22T18:15:09.390

Modified: 2024-06-21T19:15:22.970

Link: CVE-2022-23541

cve-icon Redhat

Severity : Moderate

Publid Date: 2022-12-22T00:00:00Z

Links: CVE-2022-23541 - Bugzilla