fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key (nearform fast-jwt)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.24 % · percentile 16 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
Description
fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.1.0 and earlier, the publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that is defeated by any leading whitespace in the key string, re-enabling the exact same JWT algorithm confusion attack that CVE-2023-48223 patched.
Weaknesses (CWE)
- CWE-327 — Use of a Broken or Risky Cryptographic Algorithm
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N | GitHub_M |
| CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-mvf2-f6gm-w987 — fast-jwt: Incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key
European references
- ENISA EUVD · EUVD-2026-19356
- GCVE · GCVE-0-2026-34950
Affected configurations (NVD CPE)
cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*< 6.2.0
Affected products
| Product | Versions |
|---|---|
| nearform · fast-jwt | affected <= 6.1.0 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |