Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. firebase/php-jwt
  4. ›
  5. CVE-2021-46743

CVE-2021-46743: Access of Resource Using Incompatible Type ('Type Confusion')

March 29, 2022 (updated April 8, 2022)

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.

References

  • github.com/firebase/php-jwt/issues/351
  • nvd.nist.gov/vuln/detail/CVE-2021-46743

Code Behaviors & Features

Detect and mitigate CVE-2021-46743 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.0.0

Fixed versions

  • 6.0.0

Solution

Upgrade to version 6.0.0 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

Source file

packagist/firebase/php-jwt/CVE-2021-46743.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:13 +0000.