Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-46743
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:04 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-46743
Complete source record
{
"id": "30ccce5919632503615d829b0e942f681c9542b9d6d83c7ed1db3b5df5476c12",
"url": "https://osv.dev/vulnerability/CVE-2021-46743",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-46743",
"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.",
"evidence": "osv:CVE-2021-46743",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2021-46743",
"aliases": [
"CVE-2021-46743",
"GHSA-8xf4-w7qw-pjjw"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/googleapis/php-jwt",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "0541cba75ab108ef901985e68055a92646c73534"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:google:firebase_php-jwt:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "6.0.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v5.5.1",
"v5.5.0",
"v5.4.0",
"v5.3.0",
"v5.2.1",
"v5.2.0",
"v5.1.0",
"v5.0.0",
"v4.0.0",
"v3.0.0",
"v2.2.0",
"v2.1.0",
"v2.0.0",
"v1.0.0",
"v0.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-46743.json"
}
}
],
"modified": "2026-10-20T10:55:12.065820186Z",
"provider": "osv",
"references": [
"https://github.com/firebase/php-jwt/issues/351"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-46743",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 387059,
"published_at": "2022-03-29T07:15:07.017+00:00"
}