CVE-2018-12291: Matrix synapse Matrix Synapse Security Filtering Flaw Vulnerability

HIGH
Advisory Identifier: GHSA-v8wm-g9f2-xjv4
CVSS 7.5
Published
Advisory Summary

CVE-2018-12291 is a HIGH (CVSS 7.5) matrix synapse security filtering flaw vulnerability (General Security Weakness) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves matrix synapse security filtering flaw. Remediation is available by upgrading affected packages to version 0.31.1.

CVE-2018-12291 at a Glance

CVE Identifier CVE-2018-12291
GHSA Identifier GHSA-v8wm-g9f2-xjv4
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Matrix synapse
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2018-12291

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: 0.31.1
pip install matrix-synapse>=0.31.1
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 CVE-2018-12291, 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 0.31.1), 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 General Security Weakness. 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

The `on_get_missing_events` function in handlers/federation.py in Matrix Synapse before 0.31.1 has a security bug in the get_missing_events federation API where event visibility rules were not applied correctly.

CVE-2018-12291 Affected Matrix synapse Versions

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

References

Frequently Asked Questions

What is CVE-2018-12291?
CVE-2018-12291 is a security vulnerability in Matrix synapse involving Matrix Synapse Security Filtering Flaw under General Security Weakness.
Which Matrix synapse versions are affected?
Affected versions include releases prior to 0.31.1 across affected packages: matrix-synapse.
What version fixes CVE-2018-12291?
Upgrading to 0.31.1 (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 0.31.1. Upgrade your dependency to 0.31.1 or later.
What is the CVSS score of CVE-2018-12291?
CVE-2018-12291 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2018-12291?
CVE-2018-12291 is classified under General Security Weakness.
How can I check PyPI dependencies for CVE-2018-12291?
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-v8wm-g9f2-xjv4",
  "modified" : "2023-10-06T17:13:10Z",
  "published" : "2022-05-13T01:49:32Z",
  "aliases" : [ "CVE-2018-12291" ],
  "summary" : "Matrix Synapse Security Filtering Flaw",
  "details" : "The `on_get_missing_events` function in handlers/federation.py in Matrix Synapse before 0.31.1 has a security bug in the get_missing_events federation API where event visibility rules were not applied correctly.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "matrix-synapse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.31.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-12291"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/pull/3371"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/commit/0834b49c6a9b6c597a154d4b2dfcf8fff90699ec"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/matrix-org/synapse"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/releases/tag/v0.31.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-21T22:50:51Z",
    "nvd_published_at" : "2018-06-13T14:29:00Z"
  }
}