CVE-2021-41106
PHP vulnerability analysis and mitigation

Overview

JWT is a library for working with JSON Web Token and JSON Web Signature. The vulnerability CVE-2021-41106 was discovered and disclosed on September 28, 2021, affecting versions >=3.4.0,<3.4.6, >=4.0.0,<4.0.4, and >=4.1.0,<4.1.5 of the lcobucci/jwt package. The issue involves incorrect handling of HMAC-based algorithms (HS256, HS384, and HS512) when used with LocalFileReference as key (GitHub Advisory).

Technical details

The vulnerability occurs when HMAC-based algorithms are combined with Lcobucci\JWT\Signer\Key\LocalFileReference as key. In these cases, tokens are issued and validated using the file path as the hashing key instead of the actual file contents. The HMAC hashing functions accept any string as input, which leads users to believe everything works properly when it actually doesn't. The vulnerability has been assigned a CVSS v3.1 base score of 3.3 (LOW) by NVD and 4.4 (MEDIUM) by GitHub (NVD).

Impact

The impact of this vulnerability is that tokens may be incorrectly signed and validated when using HMAC-based algorithms with LocalFileReference as the key. This could potentially lead to authentication issues as the system uses incorrect key material (file paths instead of file contents) for cryptographic operations (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in versions 3.4.6, 4.0.4, and 4.1.5. The fix includes always loading file contents, deprecating the Lcobucci\JWT\Signer\Key\LocalFileReference class, and suggesting Lcobucci\JWT\Signer\Key\InMemory as the alternative. As a workaround, users should use Lcobucci\JWT\Signer\Key\InMemory instead of Lcobucci\JWT\Signer\Key\LocalFileReference to create key instances (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23492HIGH8.8
  • PHPPHP
  • pimcore/pimcore
NoYesJan 14, 2026
CVE-2026-23498HIGH7.2
  • PHPPHP
  • shopware/core
NoYesJan 14, 2026
GHSA-595p-g7xc-c333MEDIUM6.9
  • PHPPHP
  • algolia/algoliasearch-magento-2
NoYesJan 14, 2026
CVE-2022-50807MEDIUM6.9
  • PHPPHP
  • concrete5/concrete5
NoNoJan 13, 2026
CVE-2026-0859MEDIUM5.2
  • PHPPHP
  • typo3/cms-core
NoYesJan 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management