CVE-2021-46743
JSON

9.1critical

Firebase PHP-JWT key/algorithm type confusion

Severity
9.1critical CVSS:3.1 by NVD
Exploit likelihood
0.92% (higher than 61% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-8xf4-w7qw-pjjw

Description

In Firebase PHP-JWT before 6.0.0, an algorithm-confusion issue (e.g., RS256 / HS256) exists via the kid (aka Key ID) header, when multiple types of keys are loaded in a key ring. This allows an attacker to forge tokens that validate under the incorrect key. NOTE: this provides a straightforward way to use the PHP-JWT library unsafely, but might not be considered a vulnerability in the library itself.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
firebase/php-jwt (Packagist)before 6.0.0GitHub Advisory Database
google firebase_php-jwtbefore 6.0.0NVD

All scores

GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD5.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

In Firebase PHP-JWT before 6.0.0, an algorithm-confusion issue (e.g., RS256 / HS256) exists via the kid (aka Key ID) header, when multiple types of keys are loaded in a key ring. This allows an attacker to forge tokens that validate under the incorrect key. NOTE: this provides a straightforward way to use the PHP-JWT library unsafely, but might not be considered a vulnerability in the library itself.

NVD (es)

En Firebase PHP-JWT versiones anteriores a 6.0.0, se presenta un problema de confusión de algoritmos (por ejemplo, RS256 / HS256) por medio del encabezado kid (también se conoce como Key ID), cuando son cargados varios tipos de claves en un llavero. Esto permite a un atacante falsificar tokens que son comprobados bajo la clave incorrecta. NOTA: esto proporciona una forma directa de usar la biblioteca PHP-JWT de forma no segura, pero podría no considerarse una vulnerabilidad en la propia biblioteca

References

Sources

SourceRecordLicence
CVE ListCVE-2021-46743 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-8xf4-w7qw-pjjw changed 2023-11-08CC-BY-4.0
NVDCVE-2021-46743 changed 2026-06-17Public domain