Token forgery via algorithm-unbound key selection
Published Mar 29, 2022 · Updated Aug 4, 2024
Algorithm confusion in Firebase PHP-JWT before 6.0.0 allows remote attackers to forge tokens when applications load mixed key types. The JWT::decode key-selection path trusts the attacker-controlled kid header to choose raw key material without binding the key to its permitted algorithm. The application must accept HMAC and RSA algorithms from a shared key ring; successful forgery grants the token's assigned access.
Summary
What happened
Algorithm confusion in Firebase PHP-JWT before 6.0.0 allows remote attackers to forge tokens when applications load mixed key types. The JWT::decode key-selection path trusts the attacker-controlled kid header to choose raw key material without binding the key to its permitted algorithm. The application must accept HMAC and RSA algorithms from a shared key ring; successful forgery grants the token's assigned access.
The record
- CVE
- CVE-2021-46743
- Published
- Mar 29, 2022
- Updated
- Aug 4, 2024
- Vendor
- Unknown vendor
- Product
- Unknown product
- Classifications
- CWE-347, CWE-843, T1550.001
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 29, 2022CVE publishedPublication date reported by the CVE source.
- Aug 4, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
What conditions does exploitation require?
What is affected?
Affected products and versions are unavailable in this record.
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- php-jwt-poc.zipproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo