Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High severity - Forgeable Public/Private Tokens vulnerability in jws (package.json) #130

Open
github-actions bot opened this issue Apr 4, 2023 · 0 comments

Comments

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

  • Package Manager: npm
  • Vulnerable module: jws
  • Introduced through: juice-shop@12.3.0, jsonwebtoken@0.4.0 and others

Detailed paths

  • Introduced through: juice-shop@12.3.0 › jsonwebtoken@0.4.0 › jws@0.2.6
  • Introduced through: juice-shop@12.3.0 › express-jwt@0.1.3 › jsonwebtoken@0.1.0 › jws@0.2.6

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.

Remediation

Upgrade jws to version 3.0.0 or later.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants