Advisory · CVE-2026-135686
SQL injection via sync in Trilium
Trilium through 0.107.0 contains a SQL injection vulnerability in sync that allows malicious sync partners to inject SQL and copy sessions, tokens, and user data. VulnCheck rates it Critical at CVSS 9.1 (v4.0).
- Vendor
- TriliumNext
- Product
- Trilium
- Identifier / CWE
- CVE-2026-135686
CWE-89 - Action timing
- Immediate
Explain it like I’m five
When Trilium syncs notes with another server, it trusts the names that server sends. A malicious sync partner can smuggle database commands inside those names and read or rewrite Trilium's own data.
- 01Victim syncs with a malicious partner
A Trilium instance syncs with a sync partner controlled by an attacker.
- 02Crafted entity names sent
The malicious partner supplies crafted entity names and column keys during sync.
- 03SQL injected
The sync code builds database queries from those names without sanitizing them, so injected SQL runs.
- 04Data copied
The attacker copies sessions, API tokens, and user data into synced rows and writes arbitrary database rows.
- 05Foothold established
The attacker uses the stolen sessions and tokens to access the victim's notes and accounts.
What happened
VulnCheck disclosed CVE-2026-135686: Trilium through 0.107.0 contains a SQL injection vulnerability in updateNormalEntity() that allows malicious sync partners to inject SQL by supplying crafted entity names and column keys. Attackers can abuse the sync endpoints to copy sessions, API tokens, and user data into synced rows and write arbitrary database rows. VulnCheck rates it CVSS 9.1 (critical, v4.0; 7.4 on v3.1, CWE-89). Trilium releases after 0.107.0 include the fix.
The flaw is reachable over the network from a sync partner; no privileges are required and no user interaction is required. The scope is unchanged, so the impact stays inside the affected component.
What to do
- Inventory every Trilium instance, including test, training, and individually managed deployments, and note which sync partners each one trusts.
- Upgrade Trilium to a release after 0.107.0 that includes the fix.
- Review sync partners and remove any that are untrusted while remediation is underway.
- Review application and server logs for unusual sync activity and unexpected database writes.
- Rotate sessions and API tokens if a malicious sync partner cannot be ruled out.
- Verify the deployed version after remediation.
Management note
A sync partner is a trusted peer by design, so a flaw that turns it into a database attacker is worth treating as urgent, especially where Trilium holds personal notes, credentials, or tokens.