CVE-2021-21273 Open redirects on some federation and push requests

Low 3.1 Published Updated

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.

PackageAffectedFixed in
matrix-synapse PyPIAll versions1.25.0
matrix-synapse PyPIAll versions1.25.0
matrix-synapse PyPIAll versions1.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.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as GHSA-v936-j8gp-9q3p, PYSEC-2021-131, UBUNTU-CVE-2021-21273.

Is CVE-2021-21273 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free