matrix-synapse@1.36.0 vulnerabilities

Homeserver for the Matrix decentralised comms protocol

Direct Vulnerabilities

Known vulnerabilities in the matrix-synapse package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Allocation of Resources Without Limits or Throttling

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to a weakness in how the auth chain cover index is calculated. An attacker can induce high CPU consumption and accumulate excessive data in the database by dispatching specially crafted events.

How to fix Allocation of Resources Without Limits or Throttling?

Upgrade matrix-synapse to version 1.105.1 or higher.

[,1.105.1)
  • M
Information Exposure

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Information Exposure. An attacker can query remote users' device information which can be used to enumerate the remote users known to a homeserver.

How to fix Information Exposure?

Upgrade matrix-synapse to version 1.95.1 or higher.

[,1.95.1)
  • M
Allocation of Resources Without Limits or Throttling

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the ACL event. An attacker can cause a denial of service by sending a malicious ACL event.

How to fix Allocation of Resources Without Limits or Throttling?

Upgrade matrix-synapse to version 1.94.0rc1 or higher.

[,1.94.0rc1)
  • M
Improper Input Validation

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Improper Input Validation due to the improper validation of receipts. An attacker can forge read receipts for any event by knowing the room ID and event ID.

How to fix Improper Input Validation?

Upgrade matrix-synapse to version 1.93.0 or higher.

[0.34.0,1.93.0)
  • M
Incorrect Authorization

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Incorrect Authorization in that it does not check for deactivated status of users during login, under certain conditions. Specifically, JSON Web Tokens must be enabled via the jwt_config.enabled setting, the local password database must be enabled via the password_config.enabled and password_config.localdb_enabled settings, and a user's password must be updated via an admin API after a user is deactivated.

NOTE: Installations configured to only allow login via Single Sign-On (SSO) via CAS, SAML or OpenID Connect (OIDC); or via an external password provider (e.g. LDAP) are not affected.

If not using JSON Web Tokens, the list of deactivated users with a password set can be queried from PostgreSQL:

SELECT name FROM users WHERE password_hash IS NOT NULL AND deactivated = 1;

How to fix Incorrect Authorization?

Upgrade matrix-synapse to version 1.85.0rc1 or higher.

[,1.85.0rc1)
  • L
Server-side Request Forgery (SSRF)

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) by bypassing the url_preview_url_blacklist deny list with oEmbed or image URLs used in previews. An attacker can bypass the deny list by including an IP address that is allowed by the url_preview_ip_range_blacklist setting (only public addresses by default). The information exposed by the client is limited by the following conditions:

  • For discovered oEmbed URLs, any non-JSON response or a JSON response which includes non-oEmbed information is discarded.

  • For discovered image URLs, any non-image response is discarded.

How to fix Server-side Request Forgery (SSRF)?

Upgrade matrix-synapse to version 1.85.0rc1 or higher.

[,1.85.0rc1)
  • M
Denial of Service (DoS)

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Denial of Service (DoS) to specific hosts by sending malicious invites. A malicious homeserver can disable its outbound federation to a different homeserver by sending a very large invite_room_state value in a room invite.

NOTE: Synapse instances with federation disabled are not affected.

How to fix Denial of Service (DoS)?

Upgrade matrix-synapse to version 1.74.0rc1 or higher.

[,1.74.0rc1)
  • L
Access Restriction Bypass

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Access Restriction Bypass due to Synapse homeservers answering a query for authorisation events not sufficiently checking that the requesting server should be able to access them. Authorisation events include power level events (the list of user IDs and their power levels at the time) and relevant membership events (including the display name of the sender of that event), as well as events like m.room.create, m.room.third_party_invite and m.room.join_rules. Non-authorisation events are unaffected, so it isn't possible to extract message contents this way.

NOTE: This issue is only exploitable when an attacker knows the ID of a target room and the ID of an event from that room, which increases the complexity of a realistic attack. Additionally, this issue is of negligible consequence for public rooms given that any server can easily join the roomand view authorisation events. Deployments in a closed federation where all homeservers are trustworthy are not affected.

How to fix Access Restriction Bypass?

Upgrade matrix-synapse to version 1.69.0rc1 or higher.

[,1.69.0rc1)
  • M
Allocation of Resources Without Limits or Throttling

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling such that connections will only be terminated after max_spider_size (default: 10M) bytes have been downloaded, which can in some cases lead to long-lived connections towards the streaming media server (for instance, Icecast).

How to fix Allocation of Resources Without Limits or Throttling?

Upgrade matrix-synapse to version 1.53.0 or higher.

[,1.53.0)
  • M
Denial of Service (DoS)

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to incorrect application of event authorization rules.

How to fix Denial of Service (DoS)?

Upgrade matrix-synapse to version 1.62.0 or higher.

[,1.62.0)
  • M
Uncontrolled Recursion

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Uncontrolled Recursion via the web page preview feature, due to unbounded recursion that can lead to exhaustion of the available stack space for the Synapse process. A malicious user on the home server, or remote users sending URLs that a local user's client can automatically request a URL preview for.

Note:

  1. deployments with url_preview_enabled: false (default value is false) set in are not affected.

  2. deployments with url_preview_enabled: true set in are affected.

How to fix Uncontrolled Recursion?

Upgrade matrix-synapse to version 1.61.1 or higher.

[,1.61.1)
  • H
Directory Traversal

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Directory Traversal. Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory, potentially outside the media store directory.

Note

Homeservers with the media repository disabled are unaffected. Homeservers configured with a federation whitelist are also unaffected.

How to fix Directory Traversal?

Upgrade matrix-synapse to version 1.47.1 or higher.

[,1.47.1)
  • M
Information Exposure

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Information Exposure. Unauthorised users can access the name, avatar, topic and number of members of a room if they know the ID of the room. This vulnerability is limited to homeservers where:

  • the vulnerable homeserver is in the room; and
  • untrusted users are permitted to create groups (communities).

By default, only homeserver administrators can create groups. However, homeserver administrators can already access this information in the database or using the admin API. As a result, only homeservers where the configuration setting enable_group_creation has been set to true are impacted.

How to fix Information Exposure?

Upgrade matrix-synapse to version 1.41.1 or higher.

[,1.41.1)
  • L
Information Exposure

matrix-synapse is an ecosystem for open federated Instant Messaging and VoIP.

Affected versions of this package are vulnerable to Information Exposure. Unauthorised users can access the membership (list of members, with their display names) of a room if they know the ID of the room. The vulnerability is limited to rooms with shared history visibility. Furthermore, the unauthorised user must be using an account on a vulnerable homeserver that is in the room.

How to fix Information Exposure?

Upgrade matrix-synapse to version 1.41.1 or higher.

[,1.41.1)