CVE-2020-26257 Denial of service attack via incorrect parameters to federation APIs

Medium 6.5 Published Updated

A malicious homeserver can cause denial of service in Matrix Synapse by injecting malformed events via federation APIs, affecting all servers accepting untrusted federation requests.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-26257?

CVE-2020-26257 is a medium-severity denial of service vulnerability in Fedoraproject Fedora, published on 9 Dec 2020. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Matrix is an ecosystem for open federated Instant Messaging and VoIP. Synapse is a reference "homeserver" implementation of Matrix. A malicious or poorly-implemented homeserver can inject malformed events into a room by specifying a different room id in the path of a `/send_join`, `/send_leave`, `/invite` or `/exchange_third_party_invite` request. This can lead to a denial of service in which future events will not be correctly sent to other servers over federation. This affects any server which accepts federation requests from untrusted servers. The Matrix Synapse reference implementation before version 1.23.1 the implementation is vulnerable to this injection attack. Issue is fixed in version 1.23.1. As a workaround homeserver administrators could limit access to the federation API to trusted servers (for example via `federation_domain_whitelist`).

Weakness: CWE-79, CWE-400

Which versions are affected by CVE-2020-26257?

3 open source packages ship an affected version, including matrix-synapse. It affects 2 products.

PackageAffectedFixed in
matrix-synapse PyPIAll versions1.23.1
matrix-synapse PyPIAll versions1.23.1
matrix-synapse PyPIAll versions1.23.1

Products include Fedoraproject Fedora, Matrix Synapse.

How do I fix CVE-2020-26257?

Upgrade matrix-synapse to 1.23.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2020-26257 being exploited?

There is no known exploitation of CVE-2020-26257 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as GHSA-hxmp-pqch-c8mm, PYSEC-2020-236, UBUNTU-CVE-2020-26257.

Is CVE-2020-26257 in your software?

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

Check your SBOMs for free