CVE-2021-46743 json
Firebase PHP-JWT key/algorithm type confusion
published 4y ago modified 4mo ago also GHSA-8xf4-w7qw-pjjw , EUVD-2022-1387
- cvss
- 9.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 60%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist firebase/php-jwt 6.0.0
- google firebase_php-jwt 6.0.0
Is CVE-2021-46743 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
0.92% chance of exploitation in the next 30 days, higher than 60% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/firebase/php-jwt/issues/351 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 2.0 | 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | firebase/php-jwt | <6.0.0 |
6.0.0 |
Classification
References
-
github.com
/firebase/php-jwt/issues/351
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-46743
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/firebase/php-jwt/CVE-2021-46743.yaml
web
-
github.com
/firebase/php-jwt
package
-
github.com
/firebase/php-jwt/releases/tag/v6.0.0
web
Sources
- CVE List CVE-2021-46743
- GitHub Advisory GHSA-8xf4-w7qw-pjjw
- NVD CVE-2021-46743
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.