Skip to content
Heist/ feed
Back to feed
Medium

Matrix Rust SDK allows SQL injection in the EventCache implementation

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-53549
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 01:22 UTC · Revision 1

Source evidence

Matrix Rust SDK allows SQL injection in the EventCache implementation

core-osv · Original source

Published 10 Jul 2025, 18:28 UTC

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.

osv:CVE-2025-53549
Complete source record
{
  "id": "336f402dab069e429365d4f5b57bd14badce7aa591d9319818f536eba417adae",
  "url": "https://osv.dev/vulnerability/CVE-2025-53549",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Matrix Rust SDK allows SQL injection in the EventCache implementation",
    "summary": "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.",
    "evidence": "osv:CVE-2025-53549",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-53549",
      "aliases": [
        "CVE-2025-53549",
        "GHSA-275g-g844-73jh",
        "RUSTSEC-2025-0043"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/matrix-org/matrix-rust-sdk",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1e938df90d90b5d0a423499dea42e01167b4f428"
                },
                {
                  "fixed": "18b169ca7ec17440f9fa1170026cbc32e20a06d8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.11"
                      },
                      {
                        "fixed": "0.13"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.13"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "matrix-sdk-ffi/20250702",
            "matrix-sdk-ffi/20250701",
            "matrix-sdk-ffi/20250618",
            "matrix-sdk-ui-0.12.0",
            "matrix-sdk-test-macros-0.12.0",
            "matrix-sdk-test-0.12.0",
            "matrix-sdk-store-encryption-0.12.0",
            "matrix-sdk-sqlite-0.12.0",
            "matrix-sdk-qrcode-0.12.0",
            "matrix-sdk-indexeddb-0.12.0",
            "matrix-sdk-ffi-0.12.0",
            "matrix-sdk-crypto-0.12.0",
            "matrix-sdk-common-0.12.0",
            "matrix-sdk-base-0.12.0",
            "matrix-sdk-0.12.0",
            "matrix-sdk-ui-0.11.0",
            "matrix-sdk-test-macros-0.11.0",
            "matrix-sdk-test-0.11.0",
            "matrix-sdk-store-encryption-0.11.0",
            "matrix-sdk-sqlite-0.11.0",
            "matrix-sdk-qrcode-0.11.0",
            "matrix-sdk-indexeddb-0.11.0",
            "matrix-sdk-ffi-0.11.0",
            "matrix-sdk-crypto-ffi-0.11.0",
            "matrix-sdk-crypto-0.11.0",
            "matrix-sdk-common-0.11.0",
            "matrix-sdk-base-0.11.0",
            "matrix-sdk-0.11.0",
            "matrix-sdk-ffi/20250603",
            "matrix-sdk-ffi/20250521",
            "matrix-sdk-ffi/20250507",
            "matrix-sdk-ffi/20250506",
            "matrix-sdk-ffi/20250422"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-53549.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.784392467Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53549.json",
        "https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-275g-g844-73jh",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-53549",
        "https://github.com/matrix-org/matrix-rust-sdk/pull/4849"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-89"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53549.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-53549",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516949,
  "published_at": "2025-07-10T18:28:24.373+00:00"
}