CVE-2021-21273 Open redirects on some federation and push requests
Attackers can force the Matrix Synapse server to make requests to internal infrastructure, potentially exposing internal data or bypassing network restrictions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-21273?
CVE-2021-21273 is a low-severity server-side request forgery vulnerability in Fedoraproject Fedora, published on 26 Feb 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.25.0, requests to user provided domains were not restricted to external IP addresses when calculating the key validity for third-party invite events and sending push notifications. This could cause Synapse to make requests to internal infrastructure. The type of request was not controlled by the user, although limited modification of request bodies was possible. For the most thorough protection server administrators should remove the deprecated `federation_ip_range_blacklist` from their settings after upgrading to Synapse v1.25.0 which will result in Synapse using the improved default IP address restrictions. See the new `ip_range_blacklist` and `ip_range_whitelist` settings if more specific control is necessary.
Weakness: CWE-601
Which versions are affected by CVE-2021-21273?
3 open source packages ship an affected version, including matrix-synapse. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
matrix-synapse PyPI | All versions | 1.25.0 |
matrix-synapse PyPI | All versions | 1.25.0 |
matrix-synapse PyPI | All versions | 1.25.0 |
Products include Fedoraproject Fedora, Matrix Synapse.
How do I fix CVE-2021-21273?
Upgrade matrix-synapse to 1.25.0 or later.
Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.
Is CVE-2021-21273 being exploited?
There is no known exploitation of CVE-2021-21273 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as GHSA-v936-j8gp-9q3p, PYSEC-2021-131, UBUNTU-CVE-2021-21273.