{"id":"EUVD-2023-2883","enisaUuid":"2448aaa2-0d58-3073-a872-1e4bc536496e","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 \u0027index.js\u0027 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\u0027t 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.","datePublished":"Nov 17, 2023, 9:35:00 PM","dateUpdated":"Jun 8, 2026, 11:38:16 PM","baseScore":7.5,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","references":"https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355\nhttps://github.com/joaquimserafim/json-web-token/commit/b6e56b1346f48432d29133c76b65222ad93956b7\n","aliases":"CVE-2023-48238\nGHSA-4xw9-cx39-r355\n","assigner":"GitHub_M","epss":0.32,"enisaIdProduct":[{"id":"091832f7-4eaf-38a3-9dfe-6f231f511df2","product":{"name":"json-web-token","vendor":{"name":"joaquimserafim"}},"product_version":"\u003c 4.0.0"}],"enisaIdVendor":[{"id":"79800d36-47dc-3def-84f3-dee181ee2589","vendor":{"name":"joaquimserafim"}}],"enisaIdVulnerability":[{"id":"22b43207-0a55-33fe-b5d4-f4b586999aa9","vulnerability":{"id":"GHSA-4xw9-cx39-r355","description":"json-web-token library is vulnerable to a JWT algorithm confusion attack","datePublished":"Nov 17, 2023, 10:48:15 PM","dateUpdated":"Oct 19, 2026, 7:49:16 PM","baseScore":null,"references":"https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-48238\nhttps://github.com/joaquimserafim/json-web-token/commit/b6e56b1346f48432d29133c76b65222ad93956b7\nhttps://github.com/joaquimserafim/json-web-token\nhttps://github.com/joaquimserafim/json-web-token/blob/acf6a462471e1b14187eb77414e9161b8b7bff7e/index.js#L86\n","enisa_id":"EUVD-2023-2883\n","aliases":"GHSA-4xw9-cx39-r355\nCVE-2023-48238\n","epss":0.0,"dataProcessed":"Oct 25, 2026, 1:48:40 AM","vulnerabilityProduct":[],"vulnerabilityVendor":[]}},{"id":"f3ab0d47-da15-3e02-a7ac-935644617d6d","vulnerability":{"id":"CVE-2023-48238","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 \u0027index.js\u0027 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\u0027t 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.","datePublished":"Nov 17, 2023, 9:35:00 PM","dateUpdated":"Jun 8, 2026, 11:38:16 PM","status":"PUBLISHED","baseScore":7.5,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","references":"https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355\nhttps://github.com/joaquimserafim/json-web-token/commit/b6e56b1346f48432d29133c76b65222ad93956b7\n","enisa_id":"EUVD-2023-2883\n","assigner":"GitHub_M","epss":0.32,"dataProcessed":"Oct 31, 2026, 7:16:50 AM","vulnerabilityProduct":[{"id":"695cccd0-4049-385c-8d0c-c4b020518eab","product":{"name":"json-web-token","vendor":{"name":"joaquimserafim"}},"product_version":"\u003c 4.0.0"}],"vulnerabilityVendor":[{"id":"3824e828-3318-3918-b4ec-29b29bfae70f","vendor":{"name":"joaquimserafim"}}]}}],"enisaIdAdvisory":[]}