jwt-simple@0.2.0 vulnerabilities

JWT(JSON Web Token) encode and decode module

Direct Vulnerabilities

Known vulnerabilities in the jwt-simple 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
Signature Verification Bypass

jwt-simple is a JWT(JSON Web Token) encode and decode module.

Affected versions of this package are vulnerable to Signature Verification Bypass. If no algorithm is specified in the decode() function, the packages uses the algorithm in the JWT to decode tokens. This allows an attacker to create a HS256 (symmetric algorithm) JWT with the server's public key as secret, and the package will verify it as HS256 instead of RS256 (asymmetric algorithm).

How to fix Signature Verification Bypass?

Upgrade jwt-simple to version 0.5.3 or higher.

<0.5.3
  • M
Forgeable public/private tokens

'jwt-simple' is a JSON Web Token encode and decode module. Affected versions of this package are vulnerable to an Authentication Bypass attack, due to the "algorithm" not being enforced. Attackers are given the opportunity to choose the algorithm sent to the server and generate signatures with arbitrary contents. The server expects an asymmetric key (RSA) but is sent a symmetric key (HMAC-SHA) with RSA's public key, so instead of going through a key validation process, the server will think the public key is actually an HMAC private key.

How to fix Forgeable public/private tokens?

Upgrade jwt-simple to version 0.3.0 or higher.

<0.3.0
  • M
Forgeable public/private tokens

'jwt-simple' is a JSON Web Token encode and decode module. Affected versions of this package are vulnerable to an Authentication Bypass attack, due to the "algorithm" not being enforced. Attackers are given the opportunity to choose the algorithm sent to the server and generate signatures with arbitrary contents. The server expects an asymmetric key (RSA) but is sent a symmetric key (HMAC-SHA) with RSA's public key, so instead of going through a key validation process, the server will think the public key is actually an HMAC private key.

How to fix Forgeable public/private tokens?

Upgrade jwt-simple to version 0.3.0 or higher.

<0.3.0