Vulnerability 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. Affected versions of the json-web-token library 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.
CVSS Score
HIGH
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Joaquimserafim | Json Web Token | < 3.1.1 |
Related Weaknesses (CWE)
References
- https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cExploitVendor Advisory
- https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cExploitVendor Advisory
FAQ
What is CVE-2023-48238?
CVE-2023-48238 is a vulnerability with a CVSS score of 7.5 (HIGH). 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. Affect...
How severe is CVE-2023-48238?
CVE-2023-48238 has been rated HIGH with a CVSS base score of 7.5/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2023-48238?
Check the references section above for vendor advisories and patch information. Affected products include: Joaquimserafim Json Web Token.