CVE-2016-1000223: Forgeable Public/Private Tokens in jws
Summary
CVE-2016-1000223: Forgeable Public/Private Tokens in jws. Affects jws versions < 3.0.0. Fixed in 3.0.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The jws package is an npm package used for JSON Web Signature (JWS) implementation. It provides functionality for creating, signing, and verifying JSON Web Tokens (JWTs). JWTs are commonly used as bearer tokens for authentication purposes. The vulnerability in the jws package allows an attacker to select the algorithm used to verify a JWT, enabling them to modify the token's contents while still passing verification. This can result in a complete authentication bypass.
Vulnerability Detail
The vulnerability arises from the ability to manipulate the algorithm used for JWT verification. By selecting a specific algorithm, an attacker can modify the contents of a JWT without invalidating the token. This allows them to bypass authentication mechanisms that rely on JWTs as bearer tokens. The impact of this vulnerability is significant as it undermines the security of authentication systems that depend on the integrity of JWTs.
How To Fix
Minimum fixed version
3.0.0
This is the first release that contains the fix.
npm install jws@3.0.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. Updating to the fixed version of the jws package is the recommended solution.
Conclusion
The jws package is vulnerable to a forgeable public/private tokens vulnerability, allowing an attacker to modify the contents of a JWT while still passing verification. This can result in a complete authentication bypass. It is crucial to update the jws package to version 3.0.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for jws →
FAQ
The jws package is an npm package used for JSON Web Signature (JWS) implementation. It provides functionality for creating, signing, and verifying JSON Web Tokens (JWTs).
A JSON Web Token (JWT) is a compact, URL-safe means of representing claims between two parties. It is commonly used as a bearer token for authentication and authorization purposes.
The vulnerability allows an attacker to modify the contents of a JWT while still passing verification. This can lead to a complete authentication bypass, compromising the security of systems that rely on JWTs for authentication.
Updating the jws package to version 3.0.0 or later is the recommended solution. This update includes a fix for the vulnerability and ensures secure JWT verification.
There is no known workaround for this vulnerability. Updating to the fixed version of the jws package is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for jws.