CVE-2021-29471
JSON

3.7low

Denial of service in Matrix Synapse

Severity
3.7low CVSS:3.1 by GitHub_M
Exploit likelihood
1.65% (higher than 77% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x345-32rc-8h85PYSEC-2021-135

Description

Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.33.2 "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. The issue is patched in version 1.33.2. A potential workaround might be to prevent users from making custom push rules, by blocking such requests at a reverse-proxy.

Affected

Product or packageVersionsReported by
matrix-org synapse< 1.33.2CVE List
matrix-synapse (PyPI)before 1.33.2, before 03318a766cac9f8b053db2214d9c332a977d226cGitHub Advisory Database, PyPA Advisory Database
matrix synapsebefore 1.33.2NVD
fedoraproject fedora34NVD

All scores

GitHub_M3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub3.7medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.33.2 "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. The issue is patched in version 1.33.2. A potential workaround might be to prevent users from making custom push rules, by blocking such requests at a reverse-proxy.

GitHub Advisory Database
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 security@matrix.org.

NVD (es)

Synapse es un servidor doméstico de referencia de Matrix escrito en python (paquete pypi matrix-synapse). Matrix es un ecosistema para VoIP y mensajería instantánea federada abierta. En Synapse versiones anteriores a 1.33.2, unas "Push rules" pueden especificar condiciones bajo las cuales coincidirán, incluyendo "event_match", que compara el contenido del evento con un patrón que incluye comodines. Determinados patrones pueden causar un rendimiento muy deficiente en el motor de coincidencia, conllevando a una denegación de servicio cuando se procesan eventos de duración moderada. El problema está parcheado en versión 1.33.2. Una posible solución alternativa podría ser impedir a unos usuarios crear reglas de inserción personalizadas, al bloquear dichas peticiones en un proxy inverso

References

https://github.com/matrix-org/synapse/security/advisories/GHSA-x345-32rc-8h85advisory, patch, third-party-advisory, web
https://github.com/matrix-org/synapse/commit/03318a766cac9f8b053db2214d9c332a977d226cfix, patch, third-party-advisory, web
https://github.com/matrix-org/synapse/releases/tag/v1.33.2release-notes, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY/vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-29471advisory
https://github.com/matrix-org/synapsepackage
https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-135.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEYweb

Sources

SourceRecordLicence
CVE ListCVE-2021-29471 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-x345-32rc-8h85 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-29471 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-135 changed 2023-11-08CC-BY-4.0