5.3medium
Denial of service (via resource exhaustion) due to improper input validation on third-party identifier endpoints
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.54% (higher than 75% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w9fg-xffh-p362PYSEC-2021-27
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.28.0 Synapse is missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. Note that the groups feature is not part of the Matrix specification and the chosen maximum lengths are arbitrary. Not all clients might abide by them. Refer to referenced GitHub security advisory for additional details including workarounds.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org synapse | < 1.28.0 | CVE List |
| matrix-synapse (PyPI) | before 1.28.0 | GitHub Advisory Database, PyPA Advisory Database |
| matrix synapse | from >0.17.0 before 1.28.0 | NVD |
| fedoraproject fedora | 34 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/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.28.0 Synapse is missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. Note that the groups feature is not part of the Matrix specification and the chosen maximum lengths are arbitrary. Not all clients might abide by them. Refer to referenced GitHub security advisory for additional details including workarounds.
GitHub Advisory Database
Impact
Missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion.
Patches
The issue is fixed by #9321.
Workarounds
Depending on the needs and configuration of the homeserver a few options are available:
-
Using email as third-party identifiers be disabled by not configuring the
emailsetting. -
Using phone numbers as third-party identifiers can be disabled by ensuring that
account_threepid_delegates.msisdnis not configured. -
Additionally, the affected endpoint patterns can be blocked at a reverse proxy:
^/_matrix/client/(r0|unstable)/register/email^/_matrix/client/(r0|unstable)/register/msisdn^/_matrix/client/(r0|unstable)/account/password^/_matrix/client/(r0|unstable)/account/3pid
NVD (es)
Synapse es un servidor doméstico de referencia de Matrix escrito en python (paquete pypi matrix-synapse). Matrix es un ecosistema para Mensajería Instantánea y Volp federada abierta. En Synapse anterior a versión 1.28.0 Synapse presenta una falta de comprobación de entrada de algunos parámetros en los endpoints utilizados para confirmar que identificadores de terceros podrían causar un uso excesivo del espacio en disco y la memoria conllevando a un agotamiento de los recursos. Tome en cuenta que la funcionalidad de grupos no forma parte de la especificación de Matrix y que las longitudes máximas elegidas son arbitrarias. No todos los clientes pueden acatarlos. Consulte el aviso de seguridad de GitHub al que se hace referencia para obtener detalles adicionales, incluyendo las soluciones
References
| https://github.com/matrix-org/synapse/security/advisories/GHSA-w9fg-xffh-p362 | advisory, patch, third-party-advisory, web | |
| https://pypi.org/project/matrix-synapse/ | package, product, third-party-advisory | |
| https://github.com/matrix-org/synapse/pull/9321 | patch, third-party-advisory, web | |
| https://github.com/matrix-org/synapse/pull/9393 | patch, 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-21394 | advisory | |
| https://github.com/matrix-org/synapse | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-27.yaml | web | |
| https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY | web | |
| https://pypi.org/project/matrix-synapse | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21394 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w9fg-xffh-p362 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21394 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-27 changed 2023-11-08 | CC-BY-4.0 |