Advisory

GHSA-275g-g844-73jh

Also known as: CVE-2025-53549, RUSTSEC-2025-0043

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-07-10 17:41 UTC
Modified
2025-07-11 20:45 UTC

Affected packages and fixes

matrix-sdk

crates.io · All systems

Affected

  • introduced 0.11.0, fixed 0.13.0 (semver)

Fixed versions

0.13.0

Fix

  • Fixed version 0.13.0
    cargo update -p matrix-sdk --precise 0.13.0

matrix-sdk-sqlite

crates.io · All systems

Affected

  • introduced 0.11.0, fixed 0.13.0 (semver)

Fixed versions

0.13.0

Fix

  • Fixed version 0.13.0
    cargo update -p matrix-sdk-sqlite --precise 0.13.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences