GHSA-7h5v-85w9-pq6c: Matrix synapse Remote Code Execution Vulnerability

MODERATE
CWE-400
Published
Advisory Summary

GHSA-7h5v-85w9-pq6c is a MODERATE remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves denial of service (via resource exhaustion) due to improper input validation in third-party identifier endpoint. Remediation is available by upgrading affected packages to version 1.33.0.

GHSA-7h5v-85w9-pq6c at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7h5v-85w9-pq6c
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Matrix synapse
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-7h5v-85w9-pq6c

To remediate this vulnerability, upgrade all affected Matrix synapse dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

matrix-synapse fixed: 1.33.0
pip install matrix-synapse>=1.33.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show matrix-synapse

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-7h5v-85w9-pq6c, inspect your installed packages using pip:

pip show matrix-synapse

Analyze the terminal output to locate any version of Matrix synapse in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.33.0), your application is affected.

Note: The pip show matrix-synapse command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Matrix synapse, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. ### Patches The issue is fixed by https://github.com/matrix-org/synapse/pull/9855. ### Workarounds There are no known workarounds. ### References n/a ### For more information If you have any questions or comments about this advisory, email us at security@matrix.org.

GHSA-7h5v-85w9-pq6c Affected Matrix synapse Versions

1 component(s)
Fixed Versions:
1.33.0
Product / Package Ecosystem Affected Versions Fixed Version
matrix-synapse
PyPI
< 1.33.0
1.33.0

References

Frequently Asked Questions

What is GHSA-7h5v-85w9-pq6c?
GHSA-7h5v-85w9-pq6c is a security vulnerability in Matrix synapse involving Denial of service (via resource exhaustion) due to improper input validation in third-party identifier endpoint under CWE-400: Uncontrolled Resource Consumption.
Which Matrix synapse versions are affected?
Affected versions include releases prior to 1.33.0 across affected packages: matrix-synapse.
What version fixes GHSA-7h5v-85w9-pq6c?
Upgrading to 1.33.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is matrix-synapse affected?
Yes, matrix-synapse is affected in releases prior to 1.33.0. Upgrade your dependency to 1.33.0 or later.
What CWE is associated with GHSA-7h5v-85w9-pq6c?
GHSA-7h5v-85w9-pq6c is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for GHSA-7h5v-85w9-pq6c?
Run the dependency tree command: 'pip show matrix-synapse'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7h5v-85w9-pq6c",
  "modified" : "2021-05-19T19:34:56Z",
  "published" : "2021-05-19T23:01:45Z",
  "aliases" : [ ],
  "summary" : "Denial of service (via resource exhaustion) due to improper input validation in third-party identifier endpoint",
  "details" : "### Impact\nMissing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion.\n\n### Patches\nThe issue is fixed by https://github.com/matrix-org/synapse/pull/9855.\n\n### Workarounds\nThere are no known workarounds.\n\n### References\nn/a\n\n### For more information\nIf you have any questions or comments about this advisory, email us at security@matrix.org.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "matrix-synapse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.33.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/security/advisories/GHSA-7h5v-85w9-pq6c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/pull/9855"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-19T19:34:56Z",
    "nvd_published_at" : null
  }
}