An SQL injection vulnerability in the EventCache::find_event_with_relations
method of matrix-sdk 0.11 and 0.12 allows malicious room members to execute arbitrary SQL commands in Matrix clients that directly pass relation types provided by those room members into this method, when used with the default sqlite-based store backend. Exploitation is unlikely, as no known clients currently use the API in this manner.
Passing only trusted (or sanitised) relation types to the filter
argument of EventCache::find_event_with_relations()
avoids the issue.
The issue is fixed in matrix-sdk 0.13.
The issue was introduced in https://github.com/matrix-org/matrix-rust-sdk/pull/4849.
{ "nvd_published_at": "2025-07-10T19:15:26Z", "github_reviewed_at": "2025-07-10T17:41:16Z", "github_reviewed": true, "severity": "MODERATE", "cwe_ids": [ "CWE-89" ] }