jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify() #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠️
dependabot-gitlabhas detected security vulnerability forjsonwebtokenin path:/, manifest_file:/package.jsonbut was unable to update it! ⚠️GHSA-qwph-4952-7xr6,CVE-2022-23540Description
Overview
In versions
<=8.5.1ofjsonwebtokenlibrary, lack of algorithm definition in thejwt.verify()function can lead to signature validation bypass due to defaulting to thenonealgorithm for signature verification.Am I affected?
You will be affected if you do not specify algorithms in the
jwt.verify()functionHow do I fix it?
Update to version 9.0.0 which removes the default support for the none algorithm in the
jwt.verify()method.Will the fix impact my users?
There will be no impact, if you update to version 9.0.0 and you don’t need to allow for the
nonealgorithm. If you need 'none' algorithm, you have to explicitly specify that injwt.verify()options.References