CVE-2021-21394
JSON

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 packageVersionsReported by
matrix-org synapse< 1.28.0CVE List
matrix-synapse (PyPI)before 1.28.0GitHub Advisory Database, PyPA Advisory Database
matrix synapsefrom >0.17.0 before 1.28.0NVD
fedoraproject fedora34NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD4.0medium CVSS:2.0AV: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:

  1. Using email as third-party identifiers be disabled by not configuring the email setting.

  2. Using phone numbers as third-party identifiers can be disabled by ensuring that account_threepid_delegates.msisdn is not configured.

  3. 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).&#xa0;Matrix es un ecosistema para Mensajería Instantánea y Volp federada abierta.&#xa0;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.&#xa0;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.&#xa0;No todos los clientes pueden acatarlos.&#xa0;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-p362advisory, patch, third-party-advisory, web
https://pypi.org/project/matrix-synapse/package, product, third-party-advisory
https://github.com/matrix-org/synapse/pull/9321patch, third-party-advisory, web
https://github.com/matrix-org/synapse/pull/9393patch, 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-21394advisory
https://github.com/matrix-org/synapsepackage
https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-27.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEYweb
https://pypi.org/project/matrix-synapseweb

Sources

SourceRecordLicence
CVE ListCVE-2021-21394 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-w9fg-xffh-p362 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-21394 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-27 changed 2023-11-08CC-BY-4.0