CVE-2021-40823: matrix javascript_sdk Authentication Bypass by Spoofing
Vulnerability summary
CVE-2021-40823 is a medium (CVSS 5.9) Authentication Bypass by Spoofing vulnerability in matrix javascript_sdk. EPSS estimates a 0.66% chance of exploitation in the next 30 days, higher than 53% of scored vulnerabilities.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 13-09-2021PublishedVulnerability first disclosed.
- 04-08-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · NpmEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · AlpineEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
0.66%
Chance of exploitation in the next 30 days
Percentile
53%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.66% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine2 products
- element-web< 1.8.4-r0
- riot-web< 1.8.4-r0
Debian1 product
- node-matrix-js-sdkAll versions (No fix recorded)
Matrix1 product
- javascript_sdk< 12.4.1
Npm1 product
- matrix-js-sdk< 12.4.1
Ubuntu1 product
- node-matrix-js-sdkAll versions (No fix recorded)
5 vendors · 6 products
References
11 links- github.com/matrix-org/matrix-js-sdk/releases/tag/v12.4.1X Refsource MISCREPORTWEBThird Party Advisory
- matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharingX Refsource MISCREPORTWEBVendor Advisory