---
id: CVE-2021-21393
aliases:
  - GHSA-jrh7-mhhx-6h88
  - PYSEC-2021-26
title: >-
  Denial of service (via resource exhaustion) due to improper input validation
  on groups/communities endpoints
summary: >-
  Denial of service (via resource exhaustion) due to improper input validation
  on groups/communities endpoints
severity: medium
cvss: 5.3
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'
vendor: matrix-synapse
product: matrix-synapse
ecosystem: pip
affected:
  - matrix-synapse < 1.28.0
patched:
  - matrix-synapse 1.28.0
published: '2021-04-13'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-jrh7-mhhx-6h88'
references:
  - url: >-
      https://github.com/matrix-org/synapse/security/advisories/GHSA-jrh7-mhhx-6h88
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-21393'
  - url: 'https://github.com/matrix-org/synapse/pull/9321'
  - url: 'https://github.com/matrix-org/synapse/pull/9393'
  - url: >-
      https://github.com/matrix-org/synapse/commit/3f58fc848d0002de4605bed91603a1f9f245d128
  - url: >-
      https://github.com/matrix-org/synapse/commit/d2f0ec12d5c8f113095408888e87e191ac546499
  - url: 'https://github.com/matrix-org/synapse'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-26.yaml
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY
  - url: 'https://pypi.org/project/matrix-synapse'
tags:
  - osv
  - pip
epss: 0.01596
epssPercentile: 0.74705
ingestedAt: '2026-07-08T18:25:50.877Z'
---

## Overview

### Impact
Missing input validation of some parameters on the groups (also known as communities) endpoints could cause excessive use of disk space and memory leading to resource exhaustion. Additionally clients may have issues rendering large fields.

### Patches
This issue is fixed by #9321 and #9393.

### Workarounds
The groups feature can be disabled (by setting `enable_group_creation` to `False`) to mitigate this issue. Note that it is disabled by default.

### Other information
Note that the groups feature is not part of the [Matrix specification](https://matrix.org/docs/spec/) and the chosen maximum lengths are arbitrary. Not all clients might abide by them.

## Affected packages

- `matrix-synapse < 1.28.0`

## Remediation

Upgrade to a patched release:

- `matrix-synapse 1.28.0`
