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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.35%, higher than 72% of CVEs (2026-12-01)
- Published: 2021-03-26T19:53:04.000Z
- Modified: 2026-07-08T06:27:41.174Z
- Also known as: GHSA-c5f8-35qr-q4fm, PYSEC-2021-134
- Weaknesses: CWE-74, CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- matrix-org synapse: < 1.27.0
- matrix-synapse (PyPI): before 1.27.0; before e54746bdf7d5c831eabe4dcea76a7626f1de73df
- matrix synapse: before 1.27.0
- fedoraproject fedora: 34

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- NVD: CVSS:2.0 2.6 Low `AV:N/AC:H/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/matrix-org/synapse/releases/tag/v1.27.0> (third-party-advisory, web)
- <https://github.com/matrix-org/synapse/pull/9200> (patch, third-party-advisory, web)
- <https://github.com/matrix-org/synapse/commit/e54746bdf7d5c831eabe4dcea76a7626f1de73df> (fix, patch, third-party-advisory, web)
- <https://github.com/matrix-org/synapse/security/advisories/GHSA-c5f8-35qr-q4fm> (advisory, 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-21333> (advisory)
- <https://github.com/matrix-org/synapse> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-134.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY> (web)

## Sources

- CVE List: [CVE-2021-21333](https://www.cve.org/CVERecord?id=CVE-2021-21333), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-c5f8-35qr-q4fm](https://github.com/advisories/GHSA-c5f8-35qr-q4fm), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-21333](https://nvd.nist.gov/vuln/detail/CVE-2021-21333), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-134](https://osv.dev/vulnerability/PYSEC-2021-134), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-21333 · Whole record: https://cve.day/CVE-2021-21333.json · Rebuilt by cve.day 2026-11-25T22:58:00.469Z
