CVE-2021-46743

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…

published March 29, 2022

CVSS
—
EPSS
1%
Percentile
55.8
In the wild
Unconfirmed
What it is

⚠️ A crafty mix-up in your key ring could lead to chaos! The Firebase PHP-JWT library has an algorithm confusion vulnerability that might let an attacker forge JWTs using the wrong key! 🔥 Think of it like a restaurant that uses different recipes for the same dish, but the chef doesn't double-check which recipe they picked. If a cook pulls out the wrong one, they could serve a dish that wasn't meant to be on the menu, potentially disappointing customers (or, in this case, leading to security risks). An attacker could create a valid JSON Web Token (JWT) with forged data, allowing them to impersonate users or gain unauthorized access to resources. This could lead to data breaches or even complete account takeovers, which is absolutely devastating for any application relying on secure authentication.

Put simply

Think of it like a restaurant that uses different recipes for the same dish, but the chef doesn't double-check which recipe they picked. If a cook pulls out the wrong one, they could serve a dish that wasn't meant to be on the menu, potentially disappointing customers (or, in this case, leading to security risks). This vulnerability arises from an algorithm confusion issue in Firebase PHP-JWT prior to version 6.0.0, where the Key ID (kid) header can mislead the server into accepting a JWT signed with an incorrect key, leading to potential token forgery.

What to do

An attacker could create a valid JSON Web Token (JWT) with forged data, allowing them to impersonate users or gain unauthorized access to resources. This could lead to data breaches or even complete account takeovers, which is absolutely devastating for any application relying on secure authentication. Upgrade the Firebase PHP-JWT library to version 6.0.0 or later to mitigate this vulnerability. It's also a good idea to review your key management practices to ensure that no algorithm confusion can occur in the future. Stay vigilant in testing your applications for security pitfalls! You've got this! By upgrading and reviewing your configurations, you'll be a security hero in no time! 🦸

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00789 · 55.8th percentile
Published
2022-03-29T06:40Z
EPSS history
Timeline
  • 29 MAR 06:40Z
    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…
    cvelistv5