Forgeable Public/Private Tokens Affecting jws package, versions <3.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Forgeable Public/Private Tokens vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDnpm:jws:20160726
  • published26 Jul 2016
  • disclosed26 Jul 2016
  • creditBrian Brennan and Tim McLean

Introduced: 26 Jul 2016

CVE-2016-1000223  (opens in a new tab)
CWE-310  (opens in a new tab)

How to fix?

Upgrade jws to version 3.0.0 or later.

Overview

jws is an implementation of JSON Web Signatures. Affected versions of this package are vulnerable to an Authentication Bypass attack, due to the "algorithm" not being enforced in jws.verify(). 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.

References

CVSS Scores

version 3.1