The on_get_missing_events function in handlers/federation.py in Matrix Synapse before 0.31.1 has a security bug in the getmissingevents federation API where event visibility rules were not applied correctly.
on_get_missing_events
"https://github.com/pypa/advisory-database/blob/main/vulns/matrix-synapse/PYSEC-2026-664.yaml"