CVE-2023-48238
"joaquimserafim/json-web-token RSA Algorithm Confusion Attack"
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.
INFO
Published Date :
Nov. 17, 2023, 10:15 p.m.
Last Modified :
Nov. 29, 2023, 8:53 p.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
3.6
Exploitability Score :
3.9
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2023-48238
.
URL | Resource |
---|---|
https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355 | Exploit Vendor Advisory |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2023-48238
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2023-48238
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Initial Analysis by [email protected]
Nov. 29, 2023
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Changed Reference Type https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355 No Types Assigned https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355 Exploit, Vendor Advisory Added CPE Configuration OR *cpe:2.3:a:joaquimserafim:json_web_token:*:*:*:*:*:node.js:*:* versions up to (excluding) 3.1.1 -
CVE Received by [email protected]
Nov. 17, 2023
Action Type Old Value New Value Added 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. Added Reference GitHub, Inc. https://github.com/joaquimserafim/json-web-token/security/advisories/GHSA-4xw9-cx39-r355 [No types assigned] Added CWE GitHub, Inc. CWE-345 Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2023-48238
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2023-48238
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.05 }} 0.00%
score
0.15070
percentile