Improper Authentication Affecting jsonwebtoken package, versions <9.0.0
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-JSONWEBTOKEN-3180022
- published 22 Dec 2022
- disclosed 22 Dec 2022
- credit Unknown
Introduced: 22 Dec 2022
CVE-2022-23540 Open this link in a new tabHow to fix?
Upgrade jsonwebtoken
to version 9.0.0 or higher.
Overview
jsonwebtoken is a JSON Web Token implementation (symmetric and asymmetric)
Affected versions of this package are vulnerable to Improper Authentication such that the lack of algorithm definition in the jwt.verify()
function can lead to signature validation bypass due to defaulting to the none
algorithm for signature verification.
Exploitability
Users are affected only if all of the following conditions are true for the jwt.verify()
function:
A token with no signature is received.
No algorithms are specified.
A falsy (e.g.,
null
,false
,undefined
) secret or key is passed.