CVE-2022-39249 | Matrix Javascript SDK vulnerable to impersonation via forwarded Megolm sessions

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: 2022-09-28 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-39249 is rated Moderate Risk (52.8/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.48%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-39249

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-12-09 0.16% 0.48% +0.32%
2 2025-11-21 0.56% 0.16% -0.40%
3 2025-11-18 0.56%

Full EPSS history (10 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-39249

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2022-39249

GitHub Security Advisory for CVE-2022-39249

GHSA-6263-x97c-c4gg · Severity: high · Ecosystem: npm — matrix-js-sdk subject to impersonated messages due to permissive key forwarding

OS Trackers for CVE-2022-39249

vendor priority summary link
alpine high CVE-2022-39249: 2 source package rows (element-web, riot-web); 8 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 8, open 0. https://security.alpinelinux.org/vuln/CVE-2022-39249
debian not yet assigned CVE-2022-39249 not yet assigned priority: Debian including 1 source packages (node-matrix-js-sdk), 1 status rows across 1 suites (bullseye): open 1. https://security-tracker.debian.org/tracker/CVE-2022-39249
gentoo high CVE-2022-39249: 1 GLSA(s) (202210-35), 2 atom(s) (mail-client/thunderbird, mail-client/thunderbird-bin); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-39249
redhat high https://access.redhat.com/security/cve/CVE-2022-39249
suse high CVE-2022-39249 severity important: SUSE including 11 source package names (MozillaThunderbird-102.3.1-1.1, MozillaThunderbird-102.4.0-150200.8.85.1, …), 50 product×package rows across 19 product lines (SUSE Liberty Linux 7, SUSE Liberty Linux 8, … (19 product lines)): Fixed 50. https://www.suse.com/security/cve/CVE-2022-39249/
ubuntu medium CVE-2022-39249 medium priority: Ubuntu including 2 source packages (node-matrix-js-sdk, thunderbird), 26 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 7, not-affected 6, needs-triage 5, DNE 4, released 4. https://ubuntu.com/security/CVE-2022-39249

Affected software / configurations for CVE-2022-39249

Vendor Product Version Raw CPE
matrix javascript_sdk < 19.7.0 cpe:2.3:a:matrix:javascript_sdk:*:*:*:*:*:node.js:*:*

References for CVE-2022-39249

cvelogic Threat Intelligence