CVE-2021-41106: File reference keys leads to incorrect hashes on HMAC algorithms
4.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.08406%
CWE
Published
9/29/2021
Updated
2/6/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
lcobucci/jwt | composer | >= 3.4.0, < 3.4.6 | 3.4.6 |
lcobucci/jwt | composer | >= 4.0.0, < 4.0.4 | 4.0.4 |
lcobucci/jwt | composer | >= 4.1.0, < 4.1.5 | 4.1.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from LocalFileReference's original implementation where the contents()
method returned a file URI string instead of reading the file's contents. This is confirmed by the patch modifying contents()
to load file contents via InMemory::file()
, and test cases demonstrating HMAC validation failures when using path strings instead of actual key material. The direct modification of this method in the commit and deprecation notice confirm it was the root cause.