CVE-2018-16515:
Matrix Synapse Improper Signature Validation
8.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67595%
CWE
Published
5/13/2022
Updated
10/6/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
matrix-synapse | pip | >= 0.33.3, < 0.33.3.1 | 0.33.3.1 |
matrix-synapse | pip | < 0.33.2.1 | 0.33.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper validation of cryptographic signatures on events. The patch introduced in commit 5bf8bc7 adds validation for both the sender's server and the event_id domain's server. The pre-patch version of _check_sigs_and_hashes in federation_base.py only checked signatures from the event's origin server (via p.origin) and used a single verification step via keyring.verify_json_objects_for_server. The post-patch code splits this into multiple checks via _check_sigs_on_pdus, explicitly validating both event_id_domain and sender_domain signatures (except for 3pid invites). The lack of event_id domain validation in the original function directly matches the CWE-347 description and the vulnerability's root cause.