Matrix Javascript SDK vulnerable to impersonation via forwarded Megolm sessions
Noroxi assessment
Priority: Monitor (action score 30/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1.2% (FIRST EPSS); higher than 69.7% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: thunderbird (AlmaLinux:8) 102.4.0-1.el8_6.alma; thunderbird (AlmaLinux:9) 102.4.0-1.el9_0.alma; matrix-js-sdk (npm) 19.7.0.
Low priority for now. Upgrade to thunderbird (AlmaLinux:8) 102.4.0-1.el8_6.alma; thunderbird (AlmaLinux:9) 102.4.0-1.el9_0.alma; matrix-js-sdk (npm) 19.7.0 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
Matrix Javascript SDK is the Matrix Client-Server SDK for JavaScript. Prior to version 19.7.0, an attacker cooperating with a malicious homeserver can construct messages appearing to have come from another person. Such messages will be marked with a grey shield on some platforms, but this may be missing in others. This attack is possible due to the matrix-js-sdk implementing a too permissive key forwarding strategy on the receiving end. Starting with version 19.7.0, the default policy for accepting key forwards has been made more strict in the matrix-js-sdk. matrix-js-sdk will now only accept forwarded keys in response to previously issued requests and only from own, verified devices. The SDK now sets a `trusted` flag on the decrypted message upon decryption, based on whether the key used to decrypt the message was received from a trusted source. Clients need to ensure that messages decrypted with a key with `trusted = false` are decorated appropriately, for example, by showing a warning for such messages. This attack requires coordination between a malicious homeserver and an attacker, and those who trust your homeservers do not need a workaround.
- Published
- Sep 28, 2022
- Updated
- Jun 17, 2026
- EPSS
- 1.2% · 69th percentile
- CWE
- CWE-287
Report tools
Action score
30
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.5
- CNA · GitHub_M
- 7.5
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| matrix | javascript sdk | cpe:2.3:a:matrix:javascript_sdk |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- matrix javascript sdkbefore 19.7.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
matrix-org matrix-js-sdk
- < 19.7.0affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | thunderbird | before 102.4.0-1.el8_6.alma | 102.4.0-1.el8_6.alma |
| AlmaLinux:9 | thunderbird | before 102.4.0-1.el9_0.alma | 102.4.0-1.el9_0.alma |
| Debian:11 | node-matrix-js-sdk | from 0 | — |
| npm | matrix-js-sdk | before 19.7.0 | 19.7.0 |
| openSUSE:Leap 15.3 | MozillaThunderbird | before 102.4.0-150200.8.85.1 | 102.4.0-150200.8.85.1 |
| openSUSE:Tumbleweed | element-desktop | before 1.11.8-1.1 | 1.11.8-1.1 |
| openSUSE:Tumbleweed | element-web | before 1.11.8-1.1 | 1.11.8-1.1 |
| openSUSE:Tumbleweed | MozillaThunderbird | before 102.3.1-1.1 | 102.3.1-1.1 |
| Red Hat:enterprise_linux:7::client | thunderbird | before 0:102.4.0-1.el7_9 | 0:102.4.0-1.el7_9 |
| Red Hat:enterprise_linux:7::client | thunderbird-debuginfo | before 0:102.4.0-1.el7_9 | 0:102.4.0-1.el7_9 |
| Red Hat:enterprise_linux:8::appstream | thunderbird | before 0:102.4.0-1.el8_6 | 0:102.4.0-1.el8_6 |
| Red Hat:enterprise_linux:8::appstream | thunderbird-debuginfo | before 0:102.4.0-1.el8_6 | 0:102.4.0-1.el8_6 |
| Red Hat:enterprise_linux:8::appstream | thunderbird-debugsource | before 0:102.4.0-1.el8_6 | 0:102.4.0-1.el8_6 |
| Red Hat:enterprise_linux:9::appstream | thunderbird | before 0:102.4.0-1.el9_0 | 0:102.4.0-1.el9_0 |
| Red Hat:enterprise_linux:9::appstream | thunderbird-debuginfo | before 0:102.4.0-1.el9_0 | 0:102.4.0-1.el9_0 |
| Red Hat:enterprise_linux:9::appstream | thunderbird-debugsource | before 0:102.4.0-1.el9_0 | 0:102.4.0-1.el9_0 |
| Red Hat:rhel_e4s:8.1::appstream | thunderbird | before 0:102.4.0-1.el8_1 | 0:102.4.0-1.el8_1 |
| Red Hat:rhel_e4s:8.1::appstream | thunderbird-debuginfo | before 0:102.4.0-1.el8_1 | 0:102.4.0-1.el8_1 |
| Red Hat:rhel_e4s:8.1::appstream | thunderbird-debugsource | before 0:102.4.0-1.el8_1 | 0:102.4.0-1.el8_1 |
| Red Hat:rhel_eus:8.2::appstream | thunderbird | before 0:102.4.0-1.el8_2 | 0:102.4.0-1.el8_2 |
| Red Hat:rhel_eus:8.2::appstream | thunderbird-debuginfo | before 0:102.4.0-1.el8_2 | 0:102.4.0-1.el8_2 |
| Red Hat:rhel_eus:8.2::appstream | thunderbird-debugsource | before 0:102.4.0-1.el8_2 | 0:102.4.0-1.el8_2 |
| Red Hat:rhel_eus:8.4::appstream | thunderbird | before 0:102.4.0-1.el8_4 | 0:102.4.0-1.el8_4 |
| Red Hat:rhel_eus:8.4::appstream | thunderbird-debuginfo | before 0:102.4.0-1.el8_4 | 0:102.4.0-1.el8_4 |
+4
Same product
matrix: all recordsOther highest-scoring records for the same primary product.
- CVE-2023-28427Prototype pollution in matrix-js-sdk32Monitor
- CVE-2022-39250Matrix JavaScript SDK vulnerable to key/device identifier confusion in SAS verification30Monitor
- CVE-2022-39251Matrix Javascript SDK vulnerable to Olm/Megolm protocol confusion30Monitor
Published before and after this one in the same product
- ← EarlierCVE-2021-40823Sep 13, 2021 · 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 hom23Monitor
- ← EarlierCVE-2022-39236Sep 28, 2022 · Matrix Javascript SDK improper beacon events can cause availability issues21Monitor
- Later →CVE-2022-36059Mar 28, 2023 · Prototype pollution in matrix-js-sdk21Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:thunderbird | 102.4.0-1.el9_0.alma · AlmaLinux:9 | Package registry (OSV) |
| npm:matrix-js-sdk | 19.7.0 | Package registry (OSV) |
| opensuse:element-desktop | 1.11.8-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:element-web | 1.11.8-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:MozillaThunderbird | 102.4.0-150200.8.85.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| red hat:thunderbird | 0:102.4.0-1.el9_0 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:thunderbird-debuginfo | 0:102.4.0-1.el9_0 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:thunderbird-debugsource | 0:102.4.0-1.el9_0 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| rocky linux:thunderbird | 0:102.4.0-1.el8_6 · Rocky Linux:8 | Package registry (OSV) |
| suse:MozillaThunderbird | 102.4.0-150200.8.85.1 · SUSE:Linux Enterprise Module for Package Hub 15 SP3 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- high · data or configuration can be modified
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- High
- Availability impact
- None
Weakness class (CWE)
CWE-287 · Improper AuthenticationCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
nvd-primary
Root cause
Authentication is added route by route instead of being enforced in one place. When a route added later bypasses the shared middleware, the session check never runs for it.
The bug in code
The whole CWE-287 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
app.use("/admin", requireSession, adminRouter);
// Route added later skips the middleware
app.post("/admin-api/config", updateConfig);Fixed
const admin = express.Router();
admin.use(requireSession, requireRole("admin"));
admin.post("/config", updateConfig);
app.use("/admin", admin);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Authentication AbuseCAPEC-114Medium
- Authentication BypassCAPEC-115Medium
- Identity SpoofingCAPEC-151likelihood: Medium · Medium
- Fake the Source of DataCAPEC-194Medium
- Exploiting Trust in ClientCAPEC-22likelihood: High · High
- Utilizing REST's Trust in the System Resource to Obtain Sensitive DataCAPEC-57likelihood: Medium · Very High
- Session HijackingCAPEC-593likelihood: High · Very High
- Token ImpersonationCAPEC-633Medium
ATT&CK techniques
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (5 more)Show less
- github.com/matrix-org/matrix-js-sdk/releases/tag/v19.7.0
- github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-6263-x97c-c4gg
- github.com/matrix-org/matrix-spec-proposals/pull/3061
- matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients
- security.gentoo.org/glsa/202210-35
Vendor advisories and official records. Exploit/PoC links are deliberately left out.