{"schemaVersion":3,"id":"CVE-2022-39257","aliases":[],"status":"published","duplicateOf":null,"title":null,"description":"Matrix iOS SDK allows developers to build iOS apps compatible with Matrix. Prior to version 0.23.19, 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-ios-sdk implementing a too permissive key forwarding strategy. The default policy for accepting key forwards has been made more strict in the matrix-ios-sdk version 0.23.19. matrix-ios-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 home server and an attacker, so those who trust their home servers do not need a workaround.","dates":{"published":"2022-09-28T20:55:10.000Z","modified":"2025-04-23T16:54:28.718Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","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},{"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.00996,"percentile":0.62116,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0.187,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00809},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00996,"percentile":0.62116}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00809,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00972,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00996,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00996,"percentile":0.62116}]},"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":"matrix-org","product":"matrix-ios-sdk","name":"matrix-ios-sdk","label":"matrix-ios-sdk","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 0.23.19","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.23.19","eol":null,"hubHref":"/vendor/matrix-org/matrix-ios-sdk"},{"vendor":"matrix","product":"software_development_kit","name":"software development kit","label":"software_development_kit","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 0.23.19","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.23.19","eol":null,"hubHref":"/vendor/matrix/software_development_kit"}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"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":["X Refsource MISC","Vendor Advisory"]},{"url":"https://github.com/matrix-org/matrix-ios-sdk/commit/5ca86c328a5faaab429c240551cb9ca8f0f6262c","label":"github.com/matrix-org/matrix-ios-sdk/commit/5ca86c328a5faaab429c240551cb9ca8f0f6262c","hostname":"github.com","tags":["X Refsource MISC","Patch","Third Party Advisory"]},{"url":"https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.23.19","label":"github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.23.19","hostname":"github.com","tags":["X Refsource MISC","Release Notes","Third Party Advisory"]},{"url":"https://github.com/matrix-org/matrix-ios-sdk/security/advisories/GHSA-qxr3-5jmq-xcf4","label":"github.com/matrix-org/matrix-ios-sdk/security/advisories/GHSA-qxr3-5jmq-xcf4","hostname":"github.com","tags":["X Refsource CONFIRM","Third Party Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-09-28T20:55:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T16:54:28.718Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T16:20:57.561Z","stale":false,"partial":false}}