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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.2
- **CVSS:** 5.2 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: Low; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Unreported
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.57% (percentile 41, 2026-11-26)
- **CWE:** CWE-89
- **Aliases:** GHSA-275g-g844-73jh, RUSTSEC-2025-0043
- **Published:** 2025-07-10T17:41:16.000Z
- **Modified:** 2026-10-12T18:00:10.950Z

## Who should check

- Projects that depend on crates.io package matrix-sdk (\>= 0.11.0, \< 0.13.0)
- Projects that depend on crates.io package matrix-sdk-sqlite (\>= 0.11.0, \< 0.13.0)
- Anyone running matrix-org matrix-rust-sdk \>= 0.11, \< 0.13

## 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.

## Affected and fixed versions

- crates.io `matrix-sdk`: affected \>= 0.11.0, \< 0.13.0; fixed 0.13.0 (osv)
- crates.io `matrix-sdk-sqlite`: affected \>= 0.11.0, \< 0.13.0; fixed 0.13.0 (osv)
- matrix-org matrix-rust-sdk: \>= 0.11, \< 0.13 (cvelist)

## Mitigation

- Upgrade matrix-sdk to 0.13.0 or later.
- Upgrade matrix-sdk-sqlite to 0.13.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-53549. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-53549.md
Affected: matrix-sdk >= 0.11.0, < 0.13.0; matrix-sdk-sqlite >= 0.11.0, < 0.13.0
Fixed in: 0.13.0

Steps:
1. Search this machine and project for matrix-sdk (crates.io), matrix-sdk-sqlite (crates.io), matrix-org matrix-rust-sdk: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-53549 being exploited?

There is no confirmed exploitation: CVE-2025-53549 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.57% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-53549?

Medium: CVSS 5.2 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2025-53549?

matrix-sdk \>= 0.11.0, \< 0.13.0; matrix-sdk-sqlite \>= 0.11.0, \< 0.13.0.

### Is there a fix for CVE-2025-53549?

Yes. Fixed in 0.13.0. Upgrade matrix-sdk to 0.13.0 or later. Upgrade matrix-sdk-sqlite to 0.13.0 or later.

### How do I check if I'm affected by CVE-2025-53549?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-275g-g844-73jh>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-53549>
- vendor: <https://rustsec.org/advisories/RUSTSEC-2025-0043.html>
- patch: <https://github.com/matrix-org/matrix-rust-sdk/pull/4849>
- patch: <https://github.com/matrix-org/matrix-rust-sdk/commit/d0c01006e4808db5eb96ad5c496416f284d8bd3c>
- other: <https://github.com/matrix-org/matrix-rust-sdk>
- other: <https://crates.io/crates/matrix-sdk-sqlite>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-53549>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-275g-g844-73jh> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/RUSTSEC-2025-0043> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-53549> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-53549>
