CVE-2021-21394: Denial of service (via resource exhaustion) due to improper input validation on third-party identifier endpoints
Impact Missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion.
Patches The issue is fixed by #9321.
Workarounds Depending on the needs and configuration of the homeserver a few options are available:
1. Using email as third-party identifiers be disabled by not configuring the email setting. 2. Using phone numbers as third-party identifiers can be disabled by ensuring that accountthreepiddelegates.msisdn is not configured. 3. Additionally, the affected endpoint patterns can be blocked at a reverse proxy:
^/matrix/client/(r0|unstable)/register/email ^/matrix/client/(r0|unstable)/register/msisdn ^/matrix/client/(r0|unstable)/account/password ^/matrix/client/(r0|unstable)/account/3pid
Other sources
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.28.0 Synapse is missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. Note that the groups feature is not part of the Matrix specification and the chosen maximum lengths are arbitrary. Not all clients might abide by them. Refer to referenced GitHub security advisory for additional details including workarounds.
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2021-21394?
CVE-2021-21394 is a vulnerability found in Synapse, a Matrix reference homeserver, that allows for input validation bypass.
What is the severity of CVE-2021-21394?
The severity of CVE-2021-21394 is medium with a CVSS score of 6.5.
How does CVE-2021-21394 impact Synapse?
CVE-2021-21394 allows attackers to bypass input validation on certain endpoints used to confirm third-party identity.
How do I fix CVE-2021-21394?
To fix CVE-2021-21394, it is recommended to update Synapse to version 1.28.0 or later.
What is the Common Weakness Enumeration (CWE) ID for CVE-2021-21394?
The CWE ID for CVE-2021-21394 is CWE-20, which stands for Improper Input Validation.