LiveActive security incident?Get immediate response
CVE Record

CVE-2021-41106: File reference keys leads to incorrect hashes on HMAC algorithms

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.

MediumCVSS 4.4Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Some PHP applications may have trusted JWT tokens signed with the file path string instead of the intended key file contents. This weakens token integrity for affected configurations, but only when HMAC JWT algorithms and LocalFileReference keys are used together.

Executive priority

Treat this as a targeted dependency and configuration issue, not a broad internet-wide emergency. Prioritize review where JWTs protect login sessions or authorization decisions. Patch during the next security maintenance window, faster for externally exposed authentication services using the affected pattern.

Technical view

CVE-2021-41106 affects lcobucci/jwt versions 3.4.0-3.4.5, 4.0.0-4.0.3, and 4.1.0-4.1.4. HS256, HS384, and HS512 signing or validation with Lcobucci\JWT\Signer\Key\LocalFileReference used the path as the HMAC key. Patched releases load file contents and deprecate LocalFileReference.

Likely exposure

Exposure is limited to applications using lcobucci/jwt in the affected version ranges, HMAC algorithms, and LocalFileReference for key material. Applications using unaffected versions or the recommended InMemory key type are not indicated as affected by the supplied sources.

Exploitation context

The source bundle does not cite active exploitation, and KEV is false. The CVSS vector indicates local access and low privileges, with low confidentiality and integrity impact and no availability impact. The practical risk depends on whether token signing or validation relied on the vulnerable key reference pattern.

Researcher notes

The issue maps to CWE-345 and concerns improper verification due to wrong HMAC key material. The advisory names exact affected ranges and patched versions. Evidence does not support claims about remote exploitation, affected products beyond lcobucci/jwt, or impact outside HMAC plus LocalFileReference configurations.

Mitigation direction

  • Upgrade lcobucci/jwt to 3.4.6, 4.0.4, 4.1.5, or later applicable versions.
  • Replace LocalFileReference key usage with Lcobucci\JWT\Signer\Key\InMemory where applicable.
  • Review vendor advisory guidance before changing token lifecycle or key handling.
  • Prioritize services where JWTs control authentication, authorization, or sensitive session state.

Validation and detection

  • Check composer.lock for lcobucci/jwt versions in the affected ranges.
  • Search application code for LocalFileReference used with HS256, HS384, or HS512.
  • Confirm deployments run a patched lcobucci/jwt release.
  • Verify tests cover JWT signing and validation for the configured key-loading path.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-345: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-41106 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.4 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
4.4CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N1.82.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.4Medium
CVSS 3.1 vector shape for CVE-2021-41106Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
lcobuccijwt>= 3.4.0, < 3.4.6, >= 4.0.0, < 4.0.4, >= 4.1.0, < 4.1.5Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-345 · source CWE mapping

Insufficient Verification of Data Authenticity

Insufficient Verification of Data Authenticity represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.