4.4
MEDIUM
CVE-2021-41106
Lcobucci JWT LocalFileReference Key Hashing Vulnerability
Description

JWT is a library to work with JSON Web Token and JSON Web Signature. Prior to versions 3.4.6, 4.0.4, and 4.1.5, users of HMAC-based algorithms (HS256, HS384, and HS512) combined with `Lcobucci\JWT\Signer\Key\LocalFileReference` as key are having their tokens issued/validated using the file path as hashing key - instead of the contents. The HMAC hashing functions take any string as input and, since users can issue and validate tokens, users are lead to believe that everything works properly. Versions 3.4.6, 4.0.4, and 4.1.5 have been patched to always load the file contents, deprecated the `Lcobucci\JWT\Signer\Key\LocalFileReference`, and suggest `Lcobucci\JWT\Signer\Key\InMemory` as the alternative. As a workaround, use `Lcobucci\JWT\Signer\Key\InMemory` instead of `Lcobucci\JWT\Signer\Key\LocalFileReference` to create the instances of one's keys.

INFO

Published Date :

Sept. 28, 2021, 9:15 p.m.

Last Modified :

Nov. 21, 2024, 6:25 a.m.

Remotely Exploitable :

No

Impact Score :

2.5

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2021-41106 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Jwt_project jwt
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-2021-41106.

URL Resource
https://github.com/lcobucci/jwt/commit/8175de5b841fbe3fd97d2d49b3fc15c4ecb39a73 Patch Third Party Advisory
https://github.com/lcobucci/jwt/commit/c45bb8b961a8e742d8f6b88ef5ff1bd5cca5d01c Patch Third Party Advisory
https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf Patch Third Party Advisory
https://github.com/lcobucci/jwt/commit/8175de5b841fbe3fd97d2d49b3fc15c4ecb39a73 Patch Third Party Advisory
https://github.com/lcobucci/jwt/commit/c45bb8b961a8e742d8f6b88ef5ff1bd5cca5d01c Patch Third Party Advisory
https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf Patch Third Party 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-2021-41106 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-41106 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 af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/lcobucci/jwt/commit/8175de5b841fbe3fd97d2d49b3fc15c4ecb39a73
    Added Reference https://github.com/lcobucci/jwt/commit/c45bb8b961a8e742d8f6b88ef5ff1bd5cca5d01c
    Added Reference https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Oct. 07, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:L/AC:L/Au:N/C:N/I:P/A:N)
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
    Changed Reference Type https://github.com/lcobucci/jwt/commit/8175de5b841fbe3fd97d2d49b3fc15c4ecb39a73 No Types Assigned https://github.com/lcobucci/jwt/commit/8175de5b841fbe3fd97d2d49b3fc15c4ecb39a73 Patch, Third Party Advisory
    Changed Reference Type https://github.com/lcobucci/jwt/commit/c45bb8b961a8e742d8f6b88ef5ff1bd5cca5d01c No Types Assigned https://github.com/lcobucci/jwt/commit/c45bb8b961a8e742d8f6b88ef5ff1bd5cca5d01c Patch, Third Party Advisory
    Changed Reference Type https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf No Types Assigned https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf Patch, Third Party Advisory
    Added CWE NIST CWE-345
    Added CPE Configuration OR *cpe:2.3:a:jwt_project:jwt:*:*:*:*:*:*:*:* versions from (including) 3.4.0 up to (excluding) 3.4.6 *cpe:2.3:a:jwt_project:jwt:*:*:*:*:*:*:*:* versions from (including) 4.0.0 up to (excluding) 4.0.4 *cpe:2.3:a:jwt_project:jwt:*:*:*:*:*:*:*:* versions from (including) 4.1.0 up to (excluding) 4.1.5
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-41106 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.03 }} -0.00%

score

0.06518

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability