---
id: CVE-2018-12291
aliases:
  - GHSA-v8wm-g9f2-xjv4
  - PYSEC-2026-664
title: Matrix Synapse Security Filtering Flaw
summary: Matrix Synapse Security Filtering Flaw
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
vendor: matrix-synapse
product: matrix-synapse
ecosystem: pip
affected:
  - matrix-synapse < 0.31.1
patched:
  - matrix-synapse 0.31.1
published: '2022-05-13'
updated: '2026-07-06'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-v8wm-g9f2-xjv4'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2018-12291'
  - url: 'https://github.com/matrix-org/synapse/pull/3371'
  - url: >-
      https://github.com/matrix-org/synapse/commit/0834b49c6a9b6c597a154d4b2dfcf8fff90699ec
  - url: 'https://github.com/matrix-org/synapse'
  - url: 'https://github.com/matrix-org/synapse/releases/tag/v0.31.1'
tags:
  - osv
  - pip
epss: 0.01647
epssPercentile: 0.75029
ingestedAt: '2026-07-08T18:25:53.278Z'
---

## Overview

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.

## Affected packages

- `matrix-synapse < 0.31.1`

## Remediation

Upgrade to a patched release:

- `matrix-synapse 0.31.1`
