matrix-org/synapse · Security
Denial of service attack via push rule patterns in matrix-synapse
- GHSA ID
- GHSA-x345-32rc-8h85
- CVE ID
- CVE-2021-29471
- Severity
- medium
- Published
- Updated
- CVSS
- 3.7 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- CVSS v3
- 3.7 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- CVSS v4
- 6.3 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Description
Impact
"Push rules" can specify conditions under which they will match, including event_match, which matches event content against a pattern including wildcards.
Certain patterns can cause very poor performance in the matching engine, leading to a denial-of-service when processing moderate length events.
Patches
The issue is patched by https://github.com/matrix-org/synapse/commit/03318a766cac9f8b053db2214d9c332a977d226c.
Workarounds
A potential workaround might be to prevent users from making custom push rules, by blocking such requests at a reverse-proxy.
For more information
If you have any questions or comments about this advisory, email us at [email protected].
CWEs
- CWE-331 · Insufficient Entropy
- CWE-400 · Uncontrolled Resource Consumption
References
- https://github.com/matrix-org/synapse/security/advisories/GHSA-x345-32rc-8h85 ↗
- https://github.com/matrix-org/synapse/commit/03318a766cac9f8b053db2214d9c332a977d226c ↗
- https://nvd.nist.gov/vuln/detail/CVE-2021-29471 ↗
- https://github.com/matrix-org/synapse/releases/tag/v1.33.2 ↗
- https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-135.yaml ↗
- https://lists.fedoraproject.org/archives/list/[email protected]/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY ↗
- https://github.com/advisories/GHSA-x345-32rc-8h85 ↗