{"schemaVersion":3,"id":"CVE-2022-39251","aliases":["UBUNTU-CVE-2022-39251","DEBIAN-CVE-2022-39251","GHSA-r48r-j8fx-mq2c"],"status":"published","duplicateOf":null,"title":null,"description":"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 that legitimately appear to have come from another person, without any indication such as a grey shield. Additionally, a sophisticated attacker cooperating with a malicious homeserver could employ this vulnerability to perform a targeted attack in order to send fake to-device messages appearing to originate from another user. This can allow, for example, to inject the key backup secret during a self-verification, to make a targeted device start using a malicious key backup spoofed by the homeserver. These attacks are possible due to a protocol confusion vulnerability that accepts to-device messages encrypted with Megolm instead of Olm. Starting with version 19.7.0, matrix-js-sdk has been modified to only accept Olm-encrypted to-device messages. Out of caution, several other checks have been audited or added. This attack requires coordination between a malicious home server and an attacker, so those who trust their home servers do not need a workaround.","dates":{"published":"2022-09-28T00:00:00.000Z","modified":"2025-04-23T16:55:05.561Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.6,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.6,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":8.6,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","exploitability":10,"impact":6.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01176,"percentile":0.67115,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.196,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.0098},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01176,"percentile":0.67115}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0098,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01168,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01176,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01176,"percentile":0.67115}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-287","name":"Improper Authentication","description":"When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/287.html"},{"id":"CWE-322","name":"Key Exchange without Entity Authentication","description":"The product performs a key exchange with an actor without verifying the identity of that actor.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/322.html"}],"affected":[{"vendor":"debian","product":"node-matrix-js-sdk","name":"node-matrix-js-sdk","label":"node-matrix-js-sdk","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/node-matrix-js-sdk","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"node-matrix-js-sdk","name":"node-matrix-js-sdk","label":"node-matrix-js-sdk","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/node-matrix-js-sdk","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"thunderbird","name":"thunderbird","label":"thunderbird","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/thunderbird","purlType":"deb","versions":[{"text":"< 1:102.4.2+build2-0ubuntu0.18.04.1","noFixRecorded":false,"fixedIn":null},{"text":"< 1:102.4.2+build2-0ubuntu0.20.04.1","noFixRecorded":false,"fixedIn":null},{"text":"< 1:102.4.2+build2-0ubuntu0.22.04.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1:102.4.2+build2-0ubuntu0.18.04.1 | < 1:102.4.2+build2-0ubuntu0.20.04.1 | < 1:102.4.2+build2-0ubuntu0.22.04.1","eol":null,"hubHref":null},{"vendor":"matrix-org","product":"matrix-js-sdk","name":"matrix-js-sdk","label":"matrix-js-sdk","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 19.7.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 19.7.0","eol":null,"hubHref":"/vendor/matrix-org/matrix-js-sdk"},{"vendor":"matrix","product":"javascript_sdk","name":"javascript sdk","label":"javascript_sdk","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 19.7.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 19.7.0","eol":null,"hubHref":"/vendor/matrix/javascript_sdk"},{"vendor":"Npm","product":"matrix-js-sdk","name":"matrix-js-sdk","label":"matrix-js-sdk","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/matrix-js-sdk","purlType":"npm","versions":[{"text":"< 19.7.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 19.7.0","eol":null,"hubHref":null}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76","label":"github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76","hostname":"github.com","tags":["REPORT","WEB","Patch","Third Party Advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.7.0","label":"github.com/matrix-org/matrix-js-sdk/releases/tag/v19.7.0","hostname":"github.com","tags":["REPORT","WEB","Release Notes","Third Party Advisory"]},{"url":"https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients","label":"matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients","hostname":"matrix.org","tags":["REPORT","WEB","Vendor Advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-r48r-j8fx-mq2c","label":"github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-r48r-j8fx-mq2c","hostname":"github.com","tags":["REPORT","WEB","Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202210-35","label":"security.gentoo.org/glsa/202210-35","hostname":"security.gentoo.org","tags":["Vendor Advisory","WEB","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-39251","label":"ubuntu.com/security/CVE-2022-39251","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5724-1","label":"ubuntu.com/security/notices/USN-5724-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-39251","label":"www.cve.org/CVERecord?id=CVE-2022-39251","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-39251","label":"security-tracker.debian.org/tracker/CVE-2022-39251","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39251","label":"nvd.nist.gov/vuln/detail/CVE-2022-39251","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk","label":"github.com/matrix-org/matrix-js-sdk","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":["MGASA-2022-0355","OPENSUSE-SU-2024:12374-1","OPENSUSE-SU-2024:12375-1","OPENSUSE-SU-2024:12379-1","RHSA-2022:7178","RHSA-2022:7181","RHSA-2022:7182","RHSA-2022:7183","RHSA-2022:7184","RHSA-2022:7190","SUSE-SU-2022:3800-1","USN-5724-1"],"duplicates":[],"related":["OPENSUSE-SU-2024:12374-1","OPENSUSE-SU-2024:12375-1","OPENSUSE-SU-2024:12379-1","SUSE-SU-2022:3800-1","USN-5724-1"]},"timeline":[{"kind":"published","date":"2022-09-28T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T16:55:05.561Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":35,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T23:28:47.247Z","stale":false,"partial":false}}