LiveActive security incident?Get immediate response
CVE Record

CVE-2021-40823: A logic error in the room key sharing functionality of matrix-js-sdk (aka Matrix Javascript SDK) before 12....

A logic error in the room key sharing functionality of matrix-js-sdk (aka Matrix Javascript SDK) before 12.4.1 allows a malicious Matrix homeserver present in an encrypted room to steal room encryption keys (via crafted Matrix protocol messages) that were originally sent by affected Matrix clients participating in that room. This allows the homeserver to decrypt end-to-end encrypted messages sent by affected clients.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This flaw could let a malicious Matrix homeserver inside an encrypted room obtain encryption keys from vulnerable Matrix JavaScript SDK-based clients. If successful, the homeserver could read end-to-end encrypted messages sent by affected clients, weakening a core confidentiality promise.

Executive priority

Prioritize remediation for organizations relying on Matrix end-to-end encryption for sensitive communications. The issue directly affects message confidentiality, but available sources do not show active exploitation or provide a CVSS score.

Technical view

matrix-js-sdk before 12.4.1 had a logic error in room key sharing. A malicious homeserver present in an encrypted room could send crafted Matrix protocol messages and steal room encryption keys originally sent by affected clients, enabling decryption of their end-to-end encrypted messages.

Likely exposure

Exposure is likely limited to Matrix clients or applications using matrix-js-sdk versions before 12.4.1 with encrypted rooms and room key sharing behavior.

Exploitation context

The source bundle does not cite active exploitation, and KEV is false. The attack requires a malicious Matrix homeserver already present in an encrypted room, then abuse of crafted Matrix protocol messages.

Researcher notes

Evidence names matrix-js-sdk before 12.4.1 only. The bundle does not include CVSS, CWE, exploit status, or a broader affected product list. Avoid assuming all Matrix clients are affected unless they use the vulnerable SDK version.

Mitigation direction

  • Upgrade matrix-js-sdk to version 12.4.1 or later.
  • Check Matrix project guidance for any client-specific remediation steps.
  • Prioritize clients used for sensitive encrypted communications.
  • Assess encrypted rooms that include external or untrusted homeservers.

Validation and detection

  • Inventory applications and clients using matrix-js-sdk.
  • Check lockfiles and deployed bundles for versions before 12.4.1.
  • Confirm whether affected clients participate in encrypted Matrix rooms.
  • Review Matrix disclosure and release notes for remediation confirmation.
Prepared
Confidence
medium
Sources
4

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.

cve · low confidence lookup

CVE-2021-40823 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
Unknown
CVSS
Not scored
Known Exploited
No
Published
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.

0CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS and timeline data

No CVSS vectors or timeline events were available in the normalized CVE source material.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

No CWE listed

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