CVE-2023-48238

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-48238
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-48238.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-48238
Aliases
Related
Published
2023-11-17T22:15:07Z
Modified
2025-01-08T09:44:36.039711Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/joaquimserafim/json-web-token

Affected ranges

Type
GIT
Repo
https://github.com/joaquimserafim/json-web-token
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v1.*

v1.4.3
v1.5.3
v1.6.3

v2.*

v2.0.0
v2.0.1
v2.0.2
v2.0.3
v2.1.3

v3.*

v3.0.0
v3.0.1