CVE-2021-21273
JSON

3.1low

Open redirects on some federation and push requests

Severity
3.1low CVSS:3.1 by GitHub_M
Exploit likelihood
1.82% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v936-j8gp-9q3pPYSEC-2021-131

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, requests to user provided domains were not restricted to external IP addresses when calculating the key validity for third-party invite events and sending push notifications. This could cause Synapse to make requests to internal infrastructure. The type of request was not controlled by the user, although limited modification of request bodies was possible. For the most thorough protection server administrators should remove the deprecated `federation_ip_range_blacklist` from their settings after upgrading to Synapse v1.25.0 which will result in Synapse using the improved default IP address restrictions. See the new `ip_range_blacklist` and `ip_range_whitelist` settings if more specific control is necessary.

Affected

Product or packageVersionsReported by
matrix-org synapse< 1.25.0CVE List
matrix-synapse (PyPI)before 1.25.0, before 30fba6210834a4ecd91badf0c8f3eb278b72e746GitHub Advisory Database, PyPA Advisory Database
matrix synapsebefore 1.25.0NVD
fedoraproject fedora34NVD

All scores

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

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, requests to user provided domains were not restricted to external IP addresses when calculating the key validity for third-party invite events and sending push notifications. This could cause Synapse to make requests to internal infrastructure. The type of request was not controlled by the user, although limited modification of request bodies was possible. For the most thorough protection server administrators should remove the deprecated `federation_ip_range_blacklist` from their settings after upgrading to Synapse v1.25.0 which will result in Synapse using the improved default IP address restrictions. See the new `ip_range_blacklist` and `ip_range_whitelist` settings if more specific control is necessary.

GitHub Advisory Database
Impact

Requests to user provided domains were not restricted to external IP addresses when calculating the key validity for third-party invite events and sending push notifications. This could cause Synapse to make requests to internal infrastructure. The type of request was not controlled by the user, although limited modification of request bodies was possible.

For the most thorough protection server administrators should remove the deprecated federation_ip_range_blacklist from their settings after upgrading to Synapse v1.25.0 which will result in Synapse using the improved default IP address restrictions. See the new ip_range_blacklist and ip_range_whitelist settings if more specific control is necessary.

Patches

Issue is resolved by #8821. Further improvements to protect homeservers by default were made in #8870 and #8954.

Workarounds

Requests to internal IP addresses could be blocked at the system or network level.

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, las peticiones a los dominios proporcionados por el usuario no estaban restringidas para direcciones IP externas al calcular la validez de la clave para eventos de invitación de terceros y enviar notificaciones automáticas.&#xa0;Esto podría causar que Synapse realice peticiones a la infraestructura interna.&#xa0;El tipo de petición no era controlada por el usuario, aunque una modificación limitada de los cuerpos de petición era posible.&#xa0;Para obtener la protección más completa, los administradores del servidor deben eliminar la obsoleta "federation_ip_range_blacklist" de su configuración después de actualizar a Synapse versión v1.25.0, lo que resultará en que Synapse use las restricciones de dirección IP predeterminadas mejoradas. Consulte la nueva configuración de "ip_range_blacklist" e "ip_range_whitelist" si es necesario un control más específico

References

https://github.com/matrix-org/synapse/releases/tag/v1.25.0third-party-advisory, web
https://github.com/matrix-org/synapse/security/advisories/GHSA-v936-j8gp-9q3padvisory, patch, third-party-advisory, web
https://github.com/matrix-org/synapse/pull/8821patch, third-party-advisory, web
https://github.com/matrix-org/synapse/commit/30fba6210834a4ecd91badf0c8f3eb278b72e746fix, 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-21273advisory
https://github.com/matrix-org/synapsepackage
https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-131.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEYweb

Sources

SourceRecordLicence
CVE ListCVE-2021-21273 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-v936-j8gp-9q3p changed 2026-07-08CC-BY-4.0
NVDCVE-2021-21273 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-131 changed 2023-11-08CC-BY-4.0