{"cve":"CVE-2023-48238","nvd":{"published":"2023-11-17T22:15:07.817","modified":"2026-06-17T06:33:48.490","status":"Modified","description":"joaquimserafim/json-web-token is a javascript library use to interact with JSON Web Tokens (JWT) which are a compact URL-safe means of representing claims to be transferred between two parties. Versions prior to 4.0.0 are vulnerable to a JWT algorithm confusion attack. On line 86 of the 'index.js' file, the algorithm to use for verifying the signature of the JWT token is taken from the JWT token, which at that point is still unverified and thus shouldn't be trusted. 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 against this library is the RS256 algorithm is in use, however it is a best practice to use that algorithm. Version 4.0.0 fixes the issue.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5},"cwes":["CWE-345"],"references":["https://github.com/joaquimserafim/json-web-token/commit/b6e56b1346f48432d29133c76b65222ad93956b7","https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355","https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355"],"products":["joaquimserafim:json_web_token"],"source":"nvd","synced_at":"2026-10-19T21:42:07.670898610+00:00"},"epss":{"cve":"CVE-2023-48238","score":0.00315,"percentile":0.24466,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-4xw9-cx39-r355","url":"https://osv.dev/vulnerability/GHSA-4xw9-cx39-r355","summary":"json-web-token library is vulnerable to a JWT algorithm confusion attack","modified":"2026-10-19T20:00:04.713676565Z","packages":[{"ecosystem":"npm","name":"json-web-token","purl":"pkg:npm/json-web-token","ranges":["<4.0.0"],"fixed":["4.0.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}