CVE-2021-21274
JSON

4.3medium

Denial of service attack via .well-known lookups

Severity
4.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
2.19% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2hwx-mjrm-v3g8PYSEC-2021-132

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.25.0, a malicious homeserver could redirect requests to their .well-known file to a large file. This can lead to a denial of service attack where homeservers will consume significantly more resources when requesting the .well-known file of a malicious homeserver. This affects any server which accepts federation requests from untrusted servers. Issue is resolved in version 1.25.0. As a workaround the `federation_domain_whitelist` setting can be used to restrict the homeservers communicated with over federation.

Affected

Product or packageVersionsReported by
matrix-org synapse>=0.99.0, < 1.25.0CVE List
matrix-synapse (PyPI)from 0.99.0 before 1.25.0, before ff5c4da1289cb5e097902b3e55b771be342c29d6GitHub Advisory Database, PyPA Advisory Database
matrix synapsefrom 0.99.0 before 1.25.0NVD
fedoraproject fedora34NVD

All scores

GitHub_M4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
GitHub4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/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.25.0, a malicious homeserver could redirect requests to their .well-known file to a large file. This can lead to a denial of service attack where homeservers will consume significantly more resources when requesting the .well-known file of a malicious homeserver. This affects any server which accepts federation requests from untrusted servers. Issue is resolved in version 1.25.0. As a workaround the `federation_domain_whitelist` setting can be used to restrict the homeservers communicated with over federation.

GitHub Advisory Database
Impact

A malicious homeserver could redirect requests to their .well-known file to a large file. This can lead to a denial of service attack where homeservers will consume significantly more resources when requesting the .well-known file of a malicious homeserver.

This affects any server which accepts federation requests from untrusted servers.

Patches

Issue is resolved by #8950. A bug not affecting the security aspects of this was fixed in #9108.

Workarounds

The federation_domain_whitelist setting can be used to restrict the homeservers communicated with over federation.

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 VoIP y mensajería instantánea federada abierta.&#xa0;En Synapse versiones anteriores a 1.25.0, un servidor doméstico malicioso podía redireccionar las peticiones para su archivo .well-known a un archivo grande.&#xa0;Esto puede conllevar a un ataque de denegación de servicio en el que los servidores domésticos consumirán significativamente más recursos al solicitar el archivo .well-known de un servidor doméstico malicioso.&#xa0;Esto afecta a cualquier servidor que acepte peticiones de federación desde servidores que no sean confiables.&#xa0;El problema es resuelto en versión 1.25.0.&#xa0;Como solución alternativa, el ajuste de "federation_domain_whitelist" puede ser usado para restringir los servidores domésticos que se comunican con la federación

References

https://github.com/matrix-org/synapse/security/advisories/GHSA-2hwx-mjrm-v3g8advisory, patch, third-party-advisory, web
https://github.com/matrix-org/synapse/releases/tag/v1.25.0third-party-advisory, web
https://github.com/matrix-org/synapse/pull/8950patch, third-party-advisory, web
https://github.com/matrix-org/synapse/commit/ff5c4da1289cb5e097902b3e55b771be342c29d6fix, 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-21274advisory
https://github.com/matrix-org/synapsepackage
https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-132.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEYweb

Sources

SourceRecordLicence
CVE ListCVE-2021-21274 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-2hwx-mjrm-v3g8 changed 2026-09-10CC-BY-4.0
NVDCVE-2021-21274 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-132 changed 2023-11-08CC-BY-4.0