p PatchFirst

CVE-2022-39249

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 7.5 · High · EPSS 1.3% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • matrix-js-sdk

    Versions
    • < 19.7.0: Affected

    No fix published

  • node-matrix-js-sdk Debian:11

    Versions
    • 9.11.0+~cs9.9.16-1
    • 9.11.0+~cs9.9.16-2
    • 9.3.0+~cs9.9.16-2
    • 9.7.0~~rc1+~cs9.9.16-1
    • 9.7.0~~rc1+~cs9.9.16-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • matrix-js-sdk npm

    Affected ranges
    • SEMVER: < 19.7.0

    Update to 19.7.0

  • thunderbird Ubuntu:18.04:LTS

    Versions
    • 1:52.4.0+build1-0ubuntu2
    • 1:52.6.0+build1-0ubuntu1
    • 1:52.7.0+build1-0ubuntu1
    • 1:52.8.0+build1-0ubuntu0.18.04.1
    • 1:52.9.1+build3-0ubuntu0.18.04.1
    • 1:60.2.1+build1-0ubuntu0.18.04.2
    • 1:60.4.0+build2-0ubuntu0.18.04.1
    • 1:60.5.1+build2-0ubuntu0.18.04.1
    • 1:60.6.1+build2-0ubuntu0.18.04.1
    • 1:60.7.0+build1-0ubuntu0.18.04.1
    • 1:60.7.1+build1-0ubuntu0.18.04.1
    • 1:60.7.2+build2-0ubuntu0.18.04.1
    • 1:60.8.0+build1-0ubuntu0.18.04.1
    • 1:60.9.0+build1-0ubuntu0.18.04.1
    • 1:68.2.1+build1-0ubuntu0.18.04.1
    • 1:68.2.2+build1-0ubuntu0.18.04.1
    • 1:68.4.1+build1-0ubuntu0.18.04.1
    • 1:68.7.0+build1-0ubuntu0.18.04.1
    • 1:68.8.0+build2-0ubuntu0.18.04.2
    • 1:68.10.0+build1-0ubuntu0.18.04.1
    • 1:78.8.1+build1-0ubuntu0.18.04.1
    • 1:78.11.0+build1-0ubuntu0.18.04.2
    • 1:78.13.0+build1-0ubuntu0.18.04.1
    • 1:78.14.0+build1-0ubuntu0.18.04.1
    • 1:78.14.0+build1-0ubuntu0.18.04.2
    • 1:91.5.0+build1-0ubuntu0.18.04.1
    • 1:91.7.0+build2-0ubuntu0.18.04.1
    • 1:91.8.1+build1-0ubuntu0.18.04.1
    • 1:91.9.1+build1-0ubuntu0.18.04.1
    • 1:91.11.0+build2-0ubuntu0.18.04.1
    • 1:102.2.2+build1-0ubuntu0.18.04.1
    Affected ranges
    • ECOSYSTEM: < 1:102.4.2+build2-0ubuntu0.18.04.1

    Update to 1:102.4.2+build2-0ubuntu0.18.04.1

  • thunderbird Ubuntu:20.04:LTS

    Versions
    • 1:68.1.2+build1-0ubuntu1
    • 1:68.1.2+build1-0ubuntu2
    • 1:68.2.1+build1-0ubuntu1
    • 1:68.2.2+build1-0ubuntu1
    • 1:68.3.0+build2-0ubuntu1
    • 1:68.3.1+build1-0ubuntu2
    • 1:68.4.1+build1-0ubuntu1
    • 1:68.4.2+build2-0ubuntu1
    • 1:68.5.0+build1-0ubuntu1
    • 1:68.6.0+build2-0ubuntu1
    • 1:68.7.0+build1-0ubuntu1
    • 1:68.7.0+build1-0ubuntu2
    • 1:68.8.0+build2-0ubuntu0.20.04.2
    • 1:68.10.0+build1-0ubuntu0.20.04.1
    • 1:78.7.1+build1-0ubuntu0.20.04.1
    • 1:78.8.1+build1-0ubuntu0.20.04.1
    • 1:78.11.0+build1-0ubuntu0.20.04.2
    • 1:78.13.0+build1-0ubuntu0.20.04.2
    • 1:78.14.0+build1-0ubuntu0.20.04.1
    • 1:78.14.0+build1-0ubuntu0.20.04.2
    • 1:91.5.0+build1-0ubuntu0.20.04.1
    • 1:91.7.0+build2-0ubuntu0.20.04.1
    • 1:91.8.1+build1-0ubuntu0.20.04.1
    • 1:91.9.1+build1-0ubuntu0.20.04.1
    • 1:91.11.0+build2-0ubuntu0.20.04.1
    • 1:102.2.2+build1-0ubuntu0.20.04.1
    Affected ranges
    • ECOSYSTEM: < 1:102.4.2+build2-0ubuntu0.20.04.1

    Update to 1:102.4.2+build2-0ubuntu0.20.04.1

  • node-matrix-js-sdk Ubuntu:20.04:LTS

    Versions
    • 0.9.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-matrix-js-sdk Ubuntu:22.04:LTS

    Versions
    • 9.3.0+~cs9.9.16-2
    • 9.11.0+~cs9.9.16-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • thunderbird Ubuntu:22.04:LTS

    Versions
    • 1:91.1.2+build1-0ubuntu1
    • 1:91.3.0+build2-0ubuntu1
    • 1:91.3.1+build1-0ubuntu1
    • 1:91.3.2+build1-0ubuntu1
    • 1:91.4.0+build1.1-0ubuntu1
    • 1:91.4.0+build2-0ubuntu1
    • 1:91.5.0+build1-0ubuntu1
    • 1:91.5.1+build1-0ubuntu1
    • 1:91.6.1+build1-0ubuntu1
    • 1:91.7.0+build1-0ubuntu1
    • 1:91.7.0+build2-0ubuntu1
    • 1:91.8.0+build2-0ubuntu1
    • 1:91.9.1+build1-0ubuntu0.22.04.1
    • 1:91.11.0+build2-0ubuntu0.22.04.1
    • 1:102.2.2+build1-0ubuntu0.22.04.1
    Affected ranges
    • ECOSYSTEM: < 1:102.4.2+build2-0ubuntu0.22.04.1

    Update to 1:102.4.2+build2-0ubuntu0.22.04.1

  • node-matrix-js-sdk Ubuntu:24.04:LTS

    Versions
    • 9.11.0+~cs9.9.16-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →