CVE-2022-23541
December 22, 2022
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.
Affected Packages
jsonwebtoken (CDN_JS):
Affected version(s) >=8.0.1 <9.0.0Fix Suggestion:
Update to version 9.0.0jsonwebtoken (NPM):
Affected version(s) >=0.1.0 <9.0.0Fix Suggestion:
Update to version 9.0.0Additional Notes
The description of this vulnerability differs from MITRE.
Related ResourcesĀ (8)
Do you need more information?
Contact UsCVSS v4
Base Score:
2.3
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
LOW
Vulnerable System Availability
LOW
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
LOW
Weakness Type (CWE)
EPSS
Base Score:
0.06