cve.bz

CVE-2021-41106 lcobucci jwt

3.3 lowEPSS 0.2%Fix available

Low (3.3) in lcobucci jwt. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in lcobucci/jwt 3.4.6, 4.0.4, 4.1.5.

On this page
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.

Severity

CVSS 3.1

3.3 low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 11th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-345 Insufficient Verification of Data Authenticity
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-41106 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-41106?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-41106?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-41106 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
lcobucci:jwtfrom 3.4.0 before 3.4.6
lcobucci:jwtfrom 4.0.0 before 4.0.4
lcobucci:jwtfrom 4.1.0 before 4.1.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7322-jrq4-x5hfPackagistlcobucci/jwt>=3.4.0 <3.4.63.4.6
GHSA-7322-jrq4-x5hfPackagistlcobucci/jwt>=4.0.0 <4.0.44.0.4
GHSA-7322-jrq4-x5hfPackagistlcobucci/jwt>=4.1.0 <4.1.54.1.5

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-345 (12).

References

Check your stackJSON