CVE-2021-21393: matrix-synapse - Resource Exhaustion Vulnerability
Summary
CVE-2021-21393: Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Affects matrix-synapse versions < 1.28.0. Fixed in 1.28.0. How to fix ↓
Also tracked for
- matrix-synapse · Debian:13
The same CVE-2021-21393 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
matrix-synapse is a Python-based Matrix reference homeserver that enables open federated Instant Messaging and VoIP. It serves as an implementation of the Matrix ecosystem. The vulnerability affects versions prior to 1.28.0 of Synapse. Synapse lacks input validation for certain parameters used to confirm third-party identifiers, which can lead to excessive disk space and memory usage, resulting in resource exhaustion. It is important to note that the groups feature is not part of the Matrix specification, and the chosen maximum lengths are arbitrary. It is possible that not all clients adhere to these limits.
Vulnerability Detail
The vulnerability in Synapse allows for resource exhaustion due to missing input validation on endpoints used to confirm third-party identifiers. This can result in excessive disk space and memory usage, leading to resource exhaustion. The impact of this vulnerability includes potential denial of service (DoS) attacks, as the server becomes overwhelmed with excessive resource usage. It is crucial to update to version 1.28.0 or later to mitigate this vulnerability.
How To Fix
Latest published version: 1.163.0 as of 22 Oct 2026
pip install --upgrade "matrix-synapse==1.163.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.28.0
This is the first release that contains the fix.
pip install --upgrade "matrix-synapse==1.28.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The resource exhaustion vulnerability in matrix-synapse can be mitigated by upgrading to version 1.28.0 or later. It is important to promptly apply this update to prevent potential denial of service attacks. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for matrix-synapse →
FAQ
matrix-synapse is a Python-based Matrix reference homeserver that enables open federated Instant Messaging and VoIP.
The vulnerability can lead to resource exhaustion, potentially resulting in denial of service (DoS) attacks.
Versions prior to 1.28.0 of Synapse are affected by this vulnerability.
Not all clients might abide by the arbitrary maximum lengths set for third-party identifiers, so the impact may vary.
To mitigate this vulnerability, it is recommended to upgrade to version 1.28.0 or later of the matrix-synapse package.
References
Related vulnerabilities
Recent vulnerabilities recorded for matrix-synapse.