CWE
79 74
Advisory Published
CVE Published
Updated

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

First published: Fri Mar 26 2021(Updated: )

### Impact 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. ### Patches This issue is fixed in #9200. ### Workarounds For the missed messages notifications: The `notif.html`, `notif_mail.html`, and `room.html` templates can be overridden with custom templates that manually escapes the variables using [JInja2's `escape` filter](https://jinja.palletsprojects.com/en/2.11.x/templates/#escape). See the `email.template_dir` setting. For the account expiry notifications: 1. Account expiry can be disabled via the `account_validity.enabled` setting. 2. The `notice_expiry.html` template can be overridden with a custom template that manually escapes the variables using [JInja2's `escape` filter](https://jinja.palletsprojects.com/en/2.11.x/templates/#escape). See the `email.template_dir` setting.

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Matrix Synapse<1.27.0
Fedoraproject Fedora=34
pip/matrix-synapse<1.27.0
1.27.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2021-21333?

    CVE-2021-21333 is a vulnerability in Synapse, a Matrix reference homeserver, that allows an attacker to intercept email notifications for missed messages or expiring accounts.

  • How severe is CVE-2021-21333?

    CVE-2021-21333 has a severity level of 6.1 (medium).

  • What is the affected software for CVE-2021-21333?

    The affected software for CVE-2021-21333 includes Matrix Synapse versions up to and excluding 1.27.0, as well as Fedoraproject Fedora version 34.

  • How can I fix CVE-2021-21333?

    To fix CVE-2021-21333, upgrade Matrix Synapse to version 1.27.0 or higher.

  • What is the CWE classification of CVE-2021-21333?

    The CWE classifications for CVE-2021-21333 are CWE-79 (Improper Neutralization of Input During Web Page Generation) and CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203