CVE-2021-46743
CRITICAL 9.1CVSS 3.1Firebase PHP-JWT key/algorithm type confusion
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.
- Published
- 29 Mar 2022
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-347CWE-843
- Also known as
- GHSA-8xf4-w7qw-pjjw
- Sources
- NVDJSONOSV GHSA-8xf4-w7qw-pjjwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | firebase_php-jwtcpe:2.3:a:google:firebase_php-jwt:*:*:*:*:*:*:*:* |
< 6.0.0 | 6.0.0 | |
| OSV | Packagist | firebase/php-jwt | < 6.0.0 | 6.0.0 |
References
- https://github.com/firebase/php-jwt/issues/351 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-46743 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/firebase/php-jwt/CVE-2021-46743.yaml · WEB
- https://github.com/firebase/php-jwt · PACKAGE
- https://github.com/firebase/php-jwt/releases/tag/v6.0.0 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 29 Mar 2022)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 30 Mar 2022)