CVE-2021-29430: Sydent vulnerable to denial of service attack via memory exhaustion
Summary
CVE-2021-29430: Sydent vulnerable to denial of service attack via memory exhaustion. Affects matrix-sydent versions < 2.3.0. Fixed in 2.3.0. How to fix ↓
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
Sydent is a package in the PyPI ecosystem that is used for server-side identity verification in the Matrix communication protocol. It is responsible for handling registration requests from clients and making requests to remote Matrix homeservers. This vulnerability affects any server that accepts registration requests from untrusted clients.
Vulnerability Detail
The vulnerability in Sydent arises from the lack of request size limitation for both incoming requests from HTTP clients and outgoing requests to remote Matrix homeservers. A malicious user can exploit this by sending an HTTP request with an excessively large body, causing disk space exhaustion and denial of service. Similarly, a malicious homeserver can return a very large response to Sydent, leading to memory exhaustion and denial of service. The impact of this vulnerability can result in service disruption and unavailability.
How To Fix
Minimum fixed version
2.3.0
This is the first release that contains the fix.
pip install --upgrade "matrix-sydent==2.3.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
A possible workaround for limiting request sizes is to use an HTTP reverse-proxy that can impose size restrictions on incoming requests. However, there are no known workarounds for the issue with overlarge responses.
Conclusion
The vulnerability in Sydent can be mitigated by updating the package to the latest version and applying the provided patches. It is crucial to address this vulnerability promptly to prevent potential denial of service attacks. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for matrix-sydent →
FAQ
Sydent is a server-side identity verification package used in the Matrix communication protocol.
The vulnerability allows for denial of service attacks, leading to service disruption and unavailability.
To fix this vulnerability, update the Sydent package to version 2.3.0 or later.
A workaround for limiting request sizes is to use an HTTP reverse-proxy. However, there are no known workarounds for the issue with overlarge responses.
For more information, you can email security@matrix.org.
References
Related vulnerabilities
Recent vulnerabilities recorded for matrix-sydent.