Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. jws
  4. ›
  5. GMS-2016-54

GMS-2016-54: Forgeable Public/Private Tokens

July 26, 2016

Since “algorithm” isn’t enforced in jws.verify(), a malicious user could choose what algorithm is 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/brianloveswords/node-jws/commit/585d0e1e97b6747c10cf5b7689ccc5618a89b299

Code Behaviors & Features

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

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.0.0

Fixed versions

  • 3.0.0

Solution

Update to version 3.0.0 or later.

Source file

npm/jws/GMS-2016-54.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:14:55 +0000.