# CVE-2016-1000223: node-jws algorithm confusion authentication bypass

Source: https://junglewise.ai/threats/cve-2016-1000223-node-jws-algorithm-confusion-authentication-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2016-1000223 · Severity: low · CVSS 3.1 · Published 2020-09-01

The jws library, used to create and verify JSON Web Tokens (JWTs) in Node.js applications, contains a vulnerability that allows attackers to forge authentication tokens. An attacker can modify the contents of a JWT while still passing verification, leading to complete authentication bypass in systems relying on JWTs as bearer tokens. This could result in unauthorized access to protected resources and data.

Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2016-1000223 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2016-1000223 being exploited in the wild.

**How severe is CVE-2016-1000223?** Low severity, with a CVSS score of 3.1, published 1 September 2020.

**Which products and versions are affected?** jws (npm) SEMVER:introduced=0,fixed=3.0.0.

**Is there a fix for CVE-2016-1000223?** Yes. jws (npm): upgrade to 3.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2016-1000223 attacked?** It is attacked over the network.

**Am I affected by CVE-2016-1000223?** Check whether you run jws (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- jws (npm): upgrade to 3.0.0 or later

  ```sh
  npm install jws@3.0.0
  ```


## Technical details

The vulnerability is an algorithm confusion weakness in the jws library's JWT verification logic. The vulnerable versions allow callers to specify the algorithm to use for verification, enabling an attacker to arbitrarily modify JWT claims and recompute a valid signature that will be accepted by the verifier. This occurs because the library did not enforce a required algorithm parameter, instead trusting the "alg" field in the JWT header supplied by an attacker. The fix (version 3.0.0 and later) makes the algorithm parameter mandatory and ignores the "alg" field from untrusted JWT headers. The attack requires only network access to a service using jws for JWT verification and no authentication preconditions.

## Affected products

- npm jws < 3.0.0

## Identifiers

- CVE-2016-1000223
- GHSA-gjcw-v447-2w7q

## Timeline

- 2020-09-01: disclosed
- 2015-04: patched: Fix released in version 3.0.0

## References

- [https://github.com/brianloveswords/node-jws/commit/585d0e1e97b6747c10cf5b7689ccc5618a89b299](https://github.com/brianloveswords/node-jws/commit/585d0e1e97b6747c10cf5b7689ccc5618a89b299)

## Related threats

- [Auth0 node-jws signature verification bypass in HS256 algorithm](https://junglewise.ai/threats/cve-2025-65945-auth0-node-jws-signature-verification-bypass-in-hs256-algorithm)
