Vulnerability GHSA-275g-g844-73jh

Medium Risk
MEDIUM RISK
CVSS Score: 6.0
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
1 year ago
July 10, 2025 at 05:41 PM UTC
Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation
0.11.0 - 0.12.0
0.11.0 - 0.12.0

Summary

Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation

Details

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.

Workarounds

Passing only trusted (or sanitised) relation types to the filter argument of EventCache::find_event_with_relations() avoids the issue.

Patches

The issue is fixed in matrix-sdk 0.13.

References

The issue was introduced in https://github.com/matrix-org/matrix-rust-sdk/pull/4849.

Timeline

Published
1 year ago
July 10, 2025 at 05:41 PM UTC
Fixed (0.13.0)
1 year ago
July 10, 2025 at 01:20 PM UTC
Fixed (0.13.0)
1 year ago
July 10, 2025 at 01:21 PM UTC
Last Modified
1 year ago
July 11, 2025 at 08:45 PM UTC