Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update dependency matrix-js-sdk to v24 [SECURITY] #3185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 29, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
matrix-js-sdk ^19.5.0 -> ^24.0.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2022-39236

Impact

Improperly formed beacon events (from MSC3488) can disrupt or impede the matrix-js-sdk from functioning properly, potentially impacting the consumer's ability to process data safely. Note that the matrix-js-sdk can appear to be operating normally but be excluding or corrupting runtime data presented to the consumer.

Patches

This is patched in matrix-js-sdk v19.7.0

Workarounds

Redacting applicable events, waiting for the sync processor to store data, and restarting the client can often fix it. Alternatively, redacting the applicable events and clearing all storage will fix the further perceived issues.

Downgrading to an unaffected version, noting that such a version may be subject to other vulnerabilities, will additionally resolve the issue.

References

N/A - This was a logic error in the SDK.

For more information

If you have any questions or comments about this advisory please email us at security at matrix.org.

CVE-2022-39249

Impact

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.

Key forwarding is a mechanism allowing clients to recover from “unable to decrypt” messages when they missed the initial key distribution, at the time the message was originally sent. Examples include accessing message history before they joined the room but also when some network/federation errors have occurred.

Patches

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.

A unique exception to this rule is with the experimental MSC3061, that is forwarding room keys for past messages when invited in a room configured with the proper history visibility setting. Such key forwards are parked upon receipt and are only accepted if the SDK receives an invitation for that room from the inviter in a limited time window.

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).

Workarounds

As this attack requires coordination between a malicious homeserver and an attacker, if you trust your homeserver, no particular workaround is needed.

References

Blog post: https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients

For more information

If you have any questions or comments about this advisory, e-mail us at security@matrix.org.

CVE-2022-39251

Impact

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.

Patches

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:

  • Cleartext m.room_key, m.forwarded_room_key and m.secret.send to_device messages are discarded.
  • Secrets received from untrusted devices are discarded.
  • Key backups are only usable if they have a valid signature from a trusted device (no more local trust, or trust-on-decrypt).
  • The origin of a to-device message should only be determined by observing the Olm session which managed to decrypt the message, and not by using claimed sender_key, user_id, or any other fields controllable by the homeserver.

Workarounds

As this attack requires coordination between a malicious home server and an attacker, if you trust your home server no particular workaround is needed. Notice that the backup spoofing attack is a particularly sophisticated targeted attack.

We are not aware of this attack being used in the wild, though specifying a false positive-free way of noticing malicious key backups key is challenging.

As an abundance of caution, to avoid malicious backup attacks, you should not verify your new logins using emoji/QR verifications methods until patched. Prefer verifying with your security passphrase instead.

References

Blog post: https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients

For more information

If you have any questions or comments about this advisory, e-mail us at security@matrix.org.

CVE-2022-39250

Impact

An attacker cooperating with a malicious homeserver could interfere with the verification flow between two users, injecting its own cross-signing user identity in place of one of the users’ identities, leading to the other device trusting/verifying the user identity under the control of the homeserver instead of the intended one.

The vulnerability is a bug in the matrix-js-sdk, caused by checking and signing user identities and devices in two separate steps, and inadequately fixing the keys to be signed between those steps.

Even though the attack is partly made possible due to the design decision of treating cross-signing user identities as Matrix devices on the server side (with their device ID set to the public part of the user identity key), no other examined implementations were vulnerable.

Patches

The matrix-js-sdk has been modified to double check that the key signed is the one that was verified instead of just referencing the key by ID. An additional check has been made to report an error when one of the device ID matches a cross-signing key.

Workarounds

As this attack requires coordination between a malicious homeserver and an attacker -- if you trust your homeserver no particular workaround is needed.

As a potential way of detecting compromise, it’s possible to review your device list or the device list of other users for devices with IDs in the form of a base64 cross-signing key (5XaczGNlfz0bl8R1IX5qn+tBoue2tWJqLMh+SDUuvCk) instead of classical device ID (SEHACYDHMG).

References

Blog post: https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients

For more information

If you have any questions or comments about this advisory, e-mail us at security@matrix.org

CVE-2023-28427

Impact

In certain configurations, data sent by remote servers containing special strings in key locations could cause modifications of the Object.prototype, disrupting matrix-js-sdk functionality, causing denial of service and potentially affecting program logic.

(This is part 2, where CVE-2022-36059 / GHSA-rfv9-x7hh-xc32 is part 1. Part 2 covers remaining vectors not covered by part 1, found in a codebase audit scheduled after part 1.)

Patches

The issue has been patched in matrix-js-sdk 24.0.0.

Workarounds

None.

References

  • Release blog post
  • The advisory GHSA-rfv9-x7hh-xc32 (CVE-2022-36059) refers to an initial set of vulnerable locations discovered and patched in matrix-js-sdk 19.4.0. We opted not to disclose that advisory while we performed an audit of the codebase and are now disclosing it jointly with this one.

For more information

If you have any questions or comments about this advisory please email us at security at matrix.org.

CVE-2023-29529

Impact

An attacker present in a room where an MSC3401 group call is taking place can eavesdrop on the video and audio of participants using matrix-js-sdk, without their knowledge. To affected matrix-js-sdk users, the attacker will not appear to be participating in the call.

This attack is possible because matrix-js-sdk's group call implementation accepts incoming direct calls from other users, even if they have not yet declared intent to participate in the group call, as a means of resolving a race condition in call setup. Affected versions do not restrict access to the user's outbound media in this case.

Legacy 1:1 calls are unaffected.

Workarounds

Users may hold group calls in private rooms where only the exact users who are expected to participate in the call are present.


Release Notes

matrix-org/matrix-js-sdk (matrix-js-sdk)

v24.1.0

Compare Source

==================================================================================================

✨ Features

🐛 Bug Fixes

v24.0.0

Compare Source

==================================================================================================

🔒 Security

v23.5.0

Compare Source

==================================================================================================

✨ Features

  • Implement MSC3758: a push rule condition to match event properties exactly (#​3179).
  • Enable group calls without video and audio track by configuration of MatrixClient (#​3162). Contributed by @​EnricoSchw.
  • Updates to protocol used for Sign in with QR code (#​3155). Contributed by @​hughns.
  • Implement MSC3873 to handle escaped dots in push rule keys (#​3134). Fixes undefined#1454.

🐛 Bug Fixes

v23.4.0

Compare Source

==================================================================================================

✨ Features

🐛 Bug Fixes

v23.3.0

Compare Source

==================================================================================================

✨ Features

🐛 Bug Fixes

v23.2.0

Compare Source

==================================================================================================

✨ Features

  • Implement decryption via the rust sdk (#​3074).
  • Handle edits which are bundled with an event, per MSC3925 (#​3045).

🐛 Bug Fixes

v23.1.1

Compare Source

==================================================================================================

🐛 Bug Fixes

  • Fix backwards compability for environment not support Array.prototype.at (#​3080).

v23.1.0

Compare Source

==================================================================================================

🦖 Deprecations

  • Remove extensible events v1 field population on legacy events (#​3040).

✨ Features

🐛 Bug Fixes

v23.0.0

Compare Source

==================================================================================================

🚨 BREAKING CHANGES

✨ Features

🐛 Bug Fixes

v22.0.0

Compare Source

==================================================================================================

🚨 BREAKING CHANGES

  • Enable users to join group calls from multiple devices (#​2902).

🦖 Deprecations

  • Deprecate a function containing a typo (#​2904).

✨ Features

  • sliding sync: add receipts extension (#​2912).
  • Define a spec support policy for the js-sdk (#​2882).
  • Further improvements to e2ee logging (#​2900).
  • sliding sync: add support for typing extension (#​2893).
  • Improve logging on Olm session errors (#​2885).
  • Improve logging of e2ee messages (#​2884).

🐛 Bug Fixes

v21.2.0

Compare Source

==================================================================================================

✨ Features

  • Make calls go back to 'connecting' state when media lost (#​2880).
  • Add ability to send unthreaded receipt (#​2878).
  • Add way to abort search requests (#​2877).
  • sliding sync: add custom room subscriptions support (#​2834).
  • webrtc: add advanced audio settings (#​2434). Contributed by @​MrAnno.
  • Add support for group calls using MSC3401 (#​2553).
  • Make the js-sdk conform to tsc --strict (#​2835). Fixes #​2112 #​2116 and #​2124.
  • Let leave requests outlive the window (#​2815). Fixes vector-im/element-call#639.
  • Add event and message capabilities to RoomWidgetClient (#​2797).
  • Misc fixes for group call widgets (#​2657).
  • Support nested Matrix clients via the widget API (#​2473).
  • Set max average bitrate on PTT calls (#​2499). Fixes vector-im/element-call#440.
  • Add config option for e2e group call signalling (#​2492).
  • Enable DTX on audio tracks in calls (#​2482).
  • Don't ignore call member events with a distant future expiration date (#​2466).
  • Expire call member state events after 1 hour (#​2446).
  • Emit unknown device errors for group call participants without e2e (#​2447).
  • Mute disconnected peers in PTT mode (#​2421).
  • Add support for sending encrypted to-device events with OLM (#​2322). Contributed by @​robertlong.
  • Support for PTT group call mode (#​2338).

🐛 Bug Fixes

v21.1.0

Compare Source

==================================================================================================

✨ Features

  • Loading threads with server-side assistance (#​2735). Contributed by @​justjanne.
  • Support sign in + E2EE set up using QR code implementing MSC3886, MSC3903 and MSC3906 (#​2747). Contributed by @​hughns.

🐛 Bug Fixes

v21.0.1

Compare Source

==================================================================================================

🐛 Bug Fixes

v21.0.0

Compare Source

==================================================================================================

🚨 BREAKING CHANGES

  • Changes the uploadContent API, kills off request and browser-request in favour of fetch, removed callback support on a lot of the methods, adds a lot of tests. (#​2719). Fixes #​2415 and #​801.
  • Remove deprecated m.room.aliases references (#​2759). Fixes vector-im/element-web#12680.

✨ Features

  • Remove node-specific crypto bits, use Node 16's WebCrypto (#​2762). Fixes #​2760.
  • Export types for MatrixEvent and Room emitted events, and make event handler map types stricter (#​2750). Contributed by @​stas-demydiuk.
  • Use even more stable calls to /room_keys (#​2746).
  • Upgrade to Olm 3.2.13 which has been repackaged to support Node 18 (#​2744).
  • Fix power_level_content_override type (#​2741).
  • Add custom notification handling for MSC3401 call events (#​2720).
  • Add support for unread thread notifications (#​2726).
  • Load Thread List with server-side assistance (MSC3856) (#​2602).
  • Use stable calls to /room_keys (#​2729). Fixes vector-im/element-web#22839.

🐛 Bug Fixes

v20.1.0

Compare Source

============================================================================================================

✨ Features

  • Add local notification settings capability (#​2700).
  • Implementation of MSC3882 login token request (#​2687). Contributed by @​hughns.
  • Typings for MSC2965 OIDC provider discovery (#​2424). Contributed by @​hughns.
  • Support to remotely toggle push notifications (#​2686).
  • Read receipts for threads (#​2635).

🐛 Bug Fixes

v20.0.2

Compare Source

==================================================================================================

🐛 Bug Fixes

v20.0.1

Compare Source

==================================================================================================

🐛 Bug Fixes

  • Fix missing return when receiving an invitation without shared history (#​2710).

v20.0.0

Compare Source

==================================================================================================

🚨 BREAKING CHANGES

  • Bump IDB crypto store version (#​2705).

v19.7.0

Compare Source

==================================================================================================

🔒 Security

v19.6.0

Compare Source

==================================================================================================

✨ Features

  • Add a property aggregating all names of a NamespacedValue (#​2656).
  • Implementation of MSC3824 to add action= param on SSO login (#​2398). Contributed by @​hughns.
  • Add invited_count and joined_count to sliding sync room responses. (#​2628).
  • Base support for MSC3847: Ignore invites with policy rooms (#​2626). Contributed by @​Yoric.

🐛 Bug Fixes


Configuration

📅 Schedule: Branch creation - "" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Sep 29, 2022
@renovate renovate bot changed the title deps: Update dependency matrix-js-sdk to v19.7.0 [SECURITY] deps: Update dependency matrix-js-sdk to v24 [SECURITY] Mar 30, 2023
@renovate renovate bot force-pushed the renovate/npm-matrix-js-sdk-vulnerability branch from ab1c10c to 6475787 Compare March 30, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants