NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Rust (crates.io)

CVE-2025-53549: Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation

mediumCVSS 4.0 5.2GHSA-275g-g844-73jh

An SQL injection vulnerability in the EventCache::findeventwithrelations 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.

Published Jul 10, 2025 · Updated Jul 11, 2025

Affected packages

matrix-sdk

Ecosystem
Rust (crates.io)
Affected
>= 0.11.0, < 0.13.0
Fixed in
0.13.0
Check
cargo tree -i matrix-sdk

matrix-sdk-sqlite

Ecosystem
Rust (crates.io)
Affected
>= 0.11.0, < 0.13.0
Fixed in
0.13.0
Check
cargo tree -i matrix-sdk-sqlite

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to poljar.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology