fast-jwt@2.2.3 vulnerabilities

Fast JSON Web Token implementation

Direct Vulnerabilities

Known vulnerabilities in the fast-jwt package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Improper Input Validation

fast-jwt is a Fast JSON Web Token implementation

Affected versions of this package are vulnerable to Improper Input Validation due to improperly prevention of JWT algorithm confusion for all public key types. To exploit this vulnerability, an attacker needs to craft a malicious JWT token containing the HS256 algorithm, signed with the public RSA key of the victim application.

Note: This attack will only work if the victim application utilizes a public key containing the BEGIN RSA PUBLIC KEY header.

How to fix Improper Input Validation?

Upgrade fast-jwt to version 3.3.2 or higher.

<3.3.2