Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. jwt-simple
  4. ›
  5. GMS-2016-83

GMS-2016-83: Forgeable Public/Private Tokens

October 31, 2016

“algorithm” isn’t enforced in jwt.decode() and a malicious user could choose what algorithm is sent sent to the server. If the server is expecting RSA but is sent HMAC-SHA with RSA’s public key, the server will think the public key is actually an HMAC private key. This could be used to forge any data an attacker wants.

References

  • auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  • github.com/hokaccha/node-jwt-simple/pull/14
  • github.com/hokaccha/node-jwt-simple/pull/16

Code Behaviors & Features

Detect and mitigate GMS-2016-83 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 0.3.0

Fixed versions

  • 0.3.1

Solution

Change jwt.decode() to include an algorithm parameter.

Source file

npm/jwt-simple/GMS-2016-83.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:02 +0000.