{"id":"CVE-2021-46743","aliases":["EUVD-2022-1387","GHSA-8xf4-w7qw-pjjw"],"status":"published","title":"Firebase PHP-JWT key/algorithm type confusion","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.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.00916,"percentile":0.60666,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-347","CWE-843"],"published":"2022-03-29T06:40:18Z","modified":"2026-10-20T10:55:12Z","fixes":[{"ecosystem":"Packagist","package":"firebase/php-jwt","fixed_in":["6.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"firebase/php-jwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.0.0"}]}]},{"source":"osv","ecosystem":"Packagist","package":"firebase/php-jwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.0.0"}]}],"versions":["1.0.0","2.0.0","v2.1.0","v2.2.0","v3.0.0","v4.0.0","v5.0.0","v5.1.0","v5.2.0","v5.2.1","v5.3.0","v5.4.0","v5.5.0","v5.5.1"]}],"products":[{"vendor":"google","product":"firebase_php-jwt"}],"references":[{"url":"https://github.com/firebase/php-jwt/issues/351","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46743","tags":["advisory"]},{"url":"https://github.com/firebase/php-jwt/releases/tag/v6.0.0","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/firebase/php-jwt/CVE-2021-46743.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-8xf4-w7qw-pjjw"},{"url":"https://github.com/firebase/php-jwt","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-46743","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.","status":"published","published":"2022-03-29T06:40:18Z","modified":"2024-08-04T05:17:41.727Z","updated_at":"2026-11-02T14:33:03.320536Z"}],"euvd":[{"id":"EUVD-2022-1387","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.","status":"published","published":"2022-03-29T06:40:18Z","modified":"2024-08-04T05:17:41Z","updated_at":"2026-11-03T03:08:22.448202Z"}],"ghsa":[{"id":"GHSA-8xf4-w7qw-pjjw","title":"Firebase PHP-JWT key/algorithm type confusion","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.","status":"published","published":"2022-03-30T00:00:27Z","modified":"2023-02-21T20:03:54Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-347","CWE-843"],"updated_at":"2026-11-02T14:36:45.67005Z"}],"nvd":[{"id":"CVE-2021-46743","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.","status":"published","published":"2022-03-29T07:15:07.017Z","modified":"2026-06-17T04:15:25.123Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"primary"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-843"],"updated_at":"2026-11-02T14:07:05.581807Z"}],"osv":[{"id":"CVE-2021-46743","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.","status":"published","published":"2022-03-29T07:15:07.017Z","modified":"2026-10-20T10:55:12.065820186Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T15:44:22.18434Z"},{"id":"GHSA-8xf4-w7qw-pjjw","title":"Firebase PHP-JWT key/algorithm type confusion","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.","status":"published","published":"2022-03-30T00:00:27Z","modified":"2023-11-08T04:07:27.311791Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-347","CWE-843"],"updated_at":"2026-11-02T15:46:43.123867Z"}]}}
