cve.bz

CVE-2021-40823 matrix javascript sdk: Authentication Bypass by Spoofing

5.9 mediumEPSS 0.7%Fix available

Medium (5.9) in matrix javascript sdk. EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in matrix-js-sdk 12.4.1.

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

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 53rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-290 Authentication Bypass by Spoofing
OWASP Top 10
A07:2025 Authentication 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-40823 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-40823?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-40823?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-40823 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
matrix:javascript_sdkbefore 12.4.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-23cm-x6j7-6hq3npmmatrix-js-sdk<12.4.112.4.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11node-matrix-js-sdkno fix listedDEBIAN-CVE-2021-40823
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTSnode-matrix-js-sdkno fix listedUBUNTU-CVE-2021-40823
Alpinev3.14, v3.15, v3.16 and 1 moreriot-web1.8.4-r0ALPINE-CVE-2021-40823
Alpinev3.18, v3.19, v3.20 and 4 moreelement-web1.8.4-r0ALPINE-CVE-2021-40823

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpine.

Attack patterns (CAPEC)

  • CAPEC-21 Exploitation of Trusted Identifiers Likelihood: High · Severity: High
  • CAPEC-22 Exploiting Trust in Client Likelihood: High · Severity: High
  • CAPEC-59 Session Credential Falsification through Prediction Likelihood: High · Severity: High
  • CAPEC-60 Reusing Session IDs (aka Session Replay) Likelihood: High · Severity: High
  • CAPEC-94 Adversary in the Middle (AiTM) Likelihood: High · Severity: Very High
  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-461 Web Services API Signature Forgery Leveraging Hash Function Extension Weakness Severity: High
  • CAPEC-473 Signature Spoof
  • CAPEC-476 Signature Spoofing by Misrepresentation Likelihood: Low · Severity: High
  • CAPEC-667 Bluetooth Impersonation AttackS (BIAS) Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON