jsonwebtoken
JSON Web Token signing and verification with HMAC-SHA-2, RSA PKCS#1 v1.5, RSA-PSS and ECDSA on P-256, P-384 and P-521, computed by the Node.js crypto module.
In short
What to know.
- Algorithms
- HMAC, RSA signatures, ECDSA on P-256, ECDSA on P-384 and 1 more4 of 5 would be broken by a large quantum computer.
- Advisories
- 4 in the storeOSV last read 3 December 2026, 16:48 UTC.
- What to do
- Check your version against the advisories below. Each lists its affected and fixed versions. Plan a move away from RSA signatures, ECDSA on P-256, ECDSA on P-384, ECDSA on P-521 before large quantum computers exist.
4 in the store
Advisories
| Advisory | Id | Affected versions | Fixed in | Source's rating |
|---|---|---|---|---|
| jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC | GHSA-hjrf-2m68-5959 | before 9.0.0 | Fixed in 9.0.0 | Rated Moderate |
| jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify() | GHSA-qwph-4952-7xr6 | before 9.0.0 | Fixed in 9.0.0 | Rated Moderate |
| jsonwebtoken unrestricted key type could lead to legacy keys usage | GHSA-8cf7-32gw-wr33 | before 9.0.0 | Fixed in 9.0.0 | Rated High |
| Verification Bypass in jsonwebtoken | GHSA-c7hr-j4mj-j2w6 | before 4.2.2 | Fixed in 4.2.2 | Rated Critical |
4 listed
Findings
| Finding | Id | Severity | Updated |
|---|---|---|---|
| jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify() | NMN-2026-0063 | Severity Moderate | 3 December 2026 |
| jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC | NMN-2026-0060 | Severity Moderate | 3 December 2026 |
| Verification Bypass in jsonwebtoken | NMN-2026-0057 | Severity Critical | 3 December 2026 |
| jsonwebtoken unrestricted key type could lead to legacy keys usage | NMN-2026-0056 | Severity High | 3 December 2026 |
Reviewed 3 December 2026
Sources
- npm registry metadata for jsonwebtokenregistry.npmjs.orgRetrieved 3 December 2026
- node-jsonwebtoken README (algorithms supported)github.comRetrieved 3 December 2026
Full record
- Package
- jsonwebtoken
- Ecosystem
- npm
- Role
- Protocol
- Repository
- github.com/auth0/node-jsonwebtoken
- Status
- Not marked deprecated by its registry or maintainers.
- Reviewed
- Entry reviewed 3 December 2026. Catalogue entry, curated by hand and incomplete by design.
- Advisories read
- Last read from OSV 3 December 2026, 16:48 UTC
- Findings
- 4 listed above.
Algorithms it provides
- HMAC macSymmetricWeakened by Grover's search
- RSA signatures signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-256 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-384 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-521 signatureClassical public keyBroken by Shor's algorithm
What a large quantum computer would change
- Weakened by Grover's searchGrover's search would roughly halve its effective security. 256-bit keys and outputs stay adequate.HMAC
- Broken by Shor's algorithmRests on factoring or discrete logarithms. A large fault-tolerant quantum computer running Shor's algorithm would break it.RSA signatures, ECDSA on P-256, ECDSA on P-384, ECDSA on P-521
Notes describe algorithm families, not any one project.