# CVE-2021-46743: Firebase PHP-JWT key/algorithm type confusion

- Severity: Critical 9.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.92%, higher than 61% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-03-29T06:40:18.000Z
- Modified: 2026-06-17T04:15:25.123Z
- Also known as: GHSA-8xf4-w7qw-pjjw
- Weaknesses: CWE-347, CWE-843
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- firebase/php-jwt (Packagist): before 6.0.0
- google firebase_php-jwt: before 6.0.0

## Every score

- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:2.0 5.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:N`

## 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)

## Sources

- CVE List: [CVE-2021-46743](https://www.cve.org/CVERecord?id=CVE-2021-46743), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-8xf4-w7qw-pjjw](https://github.com/advisories/GHSA-8xf4-w7qw-pjjw), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-46743](https://nvd.nist.gov/vuln/detail/CVE-2021-46743), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-46743 · Whole record: https://cve.day/CVE-2021-46743.json · Rebuilt by cve.day 2026-11-25T22:58:07.275Z
