Read the docs
TI-2021-17947 Aliases CVE-2021-41106GHSA-7322-jrq4-x5hf

File reference keys leads to incorrect hashes on HMAC algorithms

Priority LOW 20CWE-345Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Security bypass
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-345.

Summary

JWT is a library to work with JSON Web Token and JSON Web Signature. Prior to versions 3.4.6, 4.0.4, and 4.1.5, users of HMAC-based algorithms (HS256, HS384, and HS512) combined with `Lcobucci\JWT\Signer\Key\LocalFileReference` as key are having their tokens issued/validated using the file path as hashing key - instead of the contents. The HMAC hashing functions take any string as input and, since users can issue and validate tokens, users are lead to believe that everything works properly. Versions 3.4.6, 4.0.4, and 4.1.5 have been patched to always load the file contents, deprecated the `Lcobucci\JWT\Signer\Key\LocalFileReference`, and suggest `Lcobucci\JWT\Signer\Key\InMemory` as the alternative. As a workaround, use `Lcobucci\JWT\Signer\Key\InMemory` instead of `Lcobucci\JWT\Signer\Key\LocalFileReference` to create the instances of one's keys.

Why it matters now

EPSS 0.00205 10th percentileScored 2026-11-07
Fix Fixed jwt (lcobucci): 3.4.6, 4.0.4, 4.1.5lcobucci/jwt (Packagist): 3.4.6, 4.0.4, 4.1.5

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
lcobuccijwt3.4.0 to before 3.4.6; 4.0.0 to before 4.0.4; 4.1.0 to before 4.1.53.4.6, 4.0.4, 4.1.5Patch availableCNA
—lcobucci/jwt (Packagist)3.4.0 to before 3.4.63.4.6Patch availableGHSA-7322-jrq4-x5hf
—lcobucci/jwt (Packagist)4.0.0 to before 4.0.44.0.4Patch availableGHSA-7322-jrq4-x5hf
—lcobucci/jwt (Packagist)4.1.0 to before 4.1.54.1.5Patch availableGHSA-7322-jrq4-x5hf
  • jwt Vendorlcobucci Affected 3.4.0 to before 3.4.6; 4.0.0 to before 4.0.4; 4.1.0 to before 4.1.5 Fixed in 3.4.6, 4.0.4, 4.1.5 Patch available CNA
  • lcobucci/jwt (Packagist) Vendor— Affected 3.4.0 to before 3.4.6 Fixed in 3.4.6 Patch available GHSA-7322-jrq4-x5hf
  • lcobucci/jwt (Packagist) Vendor— Affected 4.0.0 to before 4.0.4 Fixed in 4.0.4 Patch available GHSA-7322-jrq4-x5hf
  • lcobucci/jwt (Packagist) Vendor— Affected 4.1.0 to before 4.1.5 Fixed in 4.1.5 Patch available GHSA-7322-jrq4-x5hf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:lcobucci:jwt:*:*:*:*:*:*:*:*3.4.0 to before 3.4.6; 4.0.0 to before 4.0.4; 4.1.0 to before 4.1.5Vulnerablelcobucci
  • cpe:2.3:a:lcobucci:jwt:*:*:*:*:*:*:*:* Versions 3.4.0 to before 3.4.6; 4.0.0 to before 4.0.4; 4.1.0 to before 4.1.5 Vulnerable ·lcobucci

Remediation

  • Fix · CNA jwt (lcobucci) Fixed in 3.4.6, 4.0.4, 4.1.5
  • Fix · GHSA-7322-jrq4-x5hf lcobucci/jwt (Packagist) Fixed in 3.4.6 Advisory →
  • Fix · GHSA-7322-jrq4-x5hf lcobucci/jwt (Packagist) Fixed in 4.0.4 Advisory →
  • Fix · GHSA-7322-jrq4-x5hf lcobucci/jwt (Packagist) Fixed in 4.1.5 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-41106
  2. 2026-10-03 Alias added: GHSA-7322-jrq4-x5hf

References

Sources