fast-jwt provides fast JSON Web Token (JWT) implementation. From 0.0.1 to before 6.2.0, setting up a custom cacheKeyBuilder method which does not properly create unique keys for different tokens can lead to cache collisions. This could cause tokens to be mis-identified during the verification process leading to valid tokens returning claims from different valid tokens and users being mis-identified as other users based on the wrong token. Version 6.2.0 contains a patch.
The vulnerability occurs when an application configures its own cacheKeyBuilder method that does not generate unique keys for different JWT tokens. In such a case, two different tokens may be assigned to the same cache key, causing a collision. During the verification process, one user's token may return claims belonging to another user. As a result, the verification mechanism treats tokens as interchangeable, violating authentication integrity.
An attacker or unauthorized user may be incorrectly identified as a different user, gaining access to their data and permissions. The vulnerability threatens data confidentiality and integrity, but does not directly affect system availability.
The fast-jwt library should be updated to version 6.2.0 or later, which contains a patch eliminating the vulnerability. Additionally, it is recommended to review custom cacheKeyBuilder implementations for generating unique keys for each token.
Nearform fast-jwt in versions from 0.0.1 to before 6.2.0, when an application uses a custom cacheKeyBuilder method.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NNearform Fast Jwt
APPNearform0.1.0 – 6.1.0 (excl.)
Related vulnerabilities
Nearform Fast-Jwt: podatność na atak JWT algorithm confusion (bypass patcha CVE-2023-48223)
fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.1.0 and earlier, fast-jwt does not validate t...
fast-jwt dostarcza szybką implementację JSON Web Token (JWT). Przed wersją 6.2.1 użycie określonych modyfikato...
fast-jwt to biblioteka zapewniająca szybką implementację JSON Web Token (JWT). W wersjach od 5.0.0 do 6.2.0 is...
fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to version 3.3.2, the fast-jwt library does ...