Read the docs
TI-2023-26087 Aliases CVE-2023-48223GHSA-c2ff-88x2-x9pg

fast-jwt JWT Algorithm Confusion

Priority LOW 28CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to version 3.3.2, the fast-jwt library does not properly prevent JWT algorithm confusion for all public key types. The 'publicKeyPemMatcher' in 'fast-jwt/src/crypto.js' does not properly match all common PEM formats for public keys. To exploit this vulnerability, an attacker needs to craft a malicious JWT token containing the HS256 algorithm, signed with the public RSA key of the victim application. This attack will only work if the victim application utilizes a public key containing the `BEGIN RSA PUBLIC KEY` header. Applications using the RS256 algorithm, a public key with a `BEGIN RSA PUBLIC KEY` header, and calling the verify function without explicitly providing an algorithm, are vulnerable to this algorithm confusion attack which allows attackers to sign arbitrary payloads which will be accepted by the verifier. Version 3.3.2 contains a patch for this issue. As a workaround, change line 29 of `blob/master/src/crypto.js` to include a regular expression.

Why it matters now

EPSS 0.00681 52nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed fast-jwt (nearform): 3.3.2fast-jwt (npm): 3.3.2

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
nearformfast-jwtbefore 3.3.23.3.2Patch availableCNA
—fast-jwt (npm)before 3.3.23.3.2Patch availableGHSA-c2ff-88x2-x9pg
  • fast-jwt Vendornearform Affected before 3.3.2 Fixed in 3.3.2 Patch available CNA
  • fast-jwt (npm) Vendor— Affected before 3.3.2 Fixed in 3.3.2 Patch available GHSA-c2ff-88x2-x9pg

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*before 3.3.2Vulnerablenearform
  • cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:* Versions before 3.3.2 Vulnerable ·nearform

Remediation

  • Fix · CNA fast-jwt (nearform) Fixed in 3.3.2
  • Fix · GHSA-c2ff-88x2-x9pg fast-jwt (npm) Fixed in 3.3.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-48223
  2. 2026-10-03 Alias added: GHSA-c2ff-88x2-x9pg

References

  • TI-2026-27174 fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key CVSS 3.1CRITICAL 9.1
  • TI-2026-27245 fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) CVSS 3.1HIGH 7.5
  • TI-2026-27243 fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS) CVSS 3.1MEDIUM 5.3
  • TI-2026-27244 ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification CVSS 3.1MEDIUM 6.5
  • TI-2026-27242 Insufficient verification of data authenticity in nearform fast-jwt CVSS 3.1CRITICAL 9.1

Sources