6.9medium
Cross-site scripting (XSS) vulnerability in the password reset endpoint
- Severity
- 6.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.22% (higher than 69% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-246w-56m2-5899PYSEC-2021-133
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.27.0, the password reset endpoint served via Synapse was vulnerable to cross-site scripting (XSS) attacks. The impact depends on the configuration of the domain that Synapse is deployed on, but may allow access to cookies and other browser data, CSRF vulnerabilities, and access to other resources served on the same domain or parent domains. This is fixed in version 1.27.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org synapse | < 1.27.0 | CVE List |
| matrix-synapse (PyPI) | before 1.27.0, before e54746bdf7d5c831eabe4dcea76a7626f1de73df | GitHub Advisory Database, PyPA Advisory Database |
| matrix synapse | before 1.27.0 | NVD |
| fedoraproject fedora | 34 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 6.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N |
| NVD | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/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.27.0, the password reset endpoint served via Synapse was vulnerable to cross-site scripting (XSS) attacks. The impact depends on the configuration of the domain that Synapse is deployed on, but may allow access to cookies and other browser data, CSRF vulnerabilities, and access to other resources served on the same domain or parent domains. This is fixed in version 1.27.0.
GitHub Advisory Database
Impact
The password reset endpoint served via Synapse was vulnerable to cross-site scripting (XSS) attacks. The impact depends on the configuration of the domain that Synapse is deployed on, but may allow access to cookies and other browser data, CSRF vulnerabilities, and access to other resources served on the same domain or parent domains.
Patches
This is fixed in #9200.
Workarounds
Depending on the needs and configuration of the homeserver a few options are available:
-
Password resets can be disabled by delegating email to a third-party service (via the
account_threepid_delegates.emailsetting) or disabling email (by not configuring theemailsetting). -
If the homeserver is not configured to use passwords (via the
password_config.enabledsetting) then the affected endpoint can be blocked at a reverse proxy:/_synapse/client/password_reset/email/submit_token
-
The
password_reset_confirmation.htmltemplate can be overridden with a custom template that manually escapes the variables using JInja2'sescapefilter. See theemail.template_dirsetting.
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.27.0, el endpoint de restablecimiento de contraseña servido por medio de Synapse era vulnerable a ataques de tipo cross-site scripting (XSS). El impacto depende de la configuración del dominio en el que es implementado Synapse, pero puede permitir el acceso a cookies y otros datos del navegador, vulnerabilidades de tipo CSRF y acceso a otros recursos que se encuentran en el mismo dominio o dominios principales. Esto es corregido en la versión 1.27.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21332 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-246w-56m2-5899 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21332 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-133 changed 2023-11-08 | CC-BY-4.0 |