CVE-2021-21332
Python vulnerability analysis and mitigation

Overview

CVE-2021-21332 affects Synapse, a Matrix reference homeserver written in Python. The vulnerability was discovered in versions before 1.27.0, where the password reset endpoint was vulnerable to cross-site scripting (XSS) attacks. The issue was disclosed and patched in January 2021 (Synapse Advisory).

Technical details

The vulnerability is a cross-site scripting (XSS) flaw in the password reset endpoint served via Synapse. The issue was caused by improper escaping of variables in HTML templates for SSO and email notifications. The vulnerability is tracked as CWE-79 (Improper Neutralization of Input During Web Page Generation) and received a CVSS v3.1 Base Score of 8.2 HIGH (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N) (NVD).

Impact

The impact depends on the configuration of the domain that Synapse is deployed on. Successful exploitation could allow attackers to access cookies and other browser data, execute CSRF attacks, and potentially access resources served on the same domain or parent domains (Synapse Advisory).

Exploitability

The vulnerability requires user interaction and can be exploited through the password reset endpoint. The attack vector is network-accessible (AV:N) with low attack complexity (AC:L) and requires no privileges (PR:N) (NVD).

Mitigation and workarounds

The vulnerability was fixed in Synapse version 1.27.0. For unpatched systems, several workarounds are available: disable password resets by delegating email to a third-party service, disable email functionality, block the affected endpoint at a reverse proxy (/_synapse/client/password_reset/email/submit_token), or override the password_reset_confirmation.html template with a custom template that manually escapes variables (Synapse Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66455CRITICAL9.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-63374CRITICAL9.3
  • Python logoPython
  • airflow-3
NoYesSep 18, 2026
CVE-2026-59163CRITICAL9.1
  • Python logoPython
  • mnemosyne-memory
NoYesSep 18, 2026
CVE-2026-33625HIGH8.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-64847MEDIUM6.8
  • Python logoPython
  • py3-anyio
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management