ZeroHour

CVE-2026-53579

moderate

Trilium Notes Safe import bypass turns book-note XSS into RCE on desktop

CVSS 4.0
9.3 critical
EPSS
<1%p12
Published
()
Modified
AI analysis

CVE-2026-53579 is a sanitization gap in Trilium's default-on 'Safe import' filter: imported HTML is sanitized only for text notes, while 'book' notes are stored without sanitization and later rendered as HTML. An attacker who supplies a malicious import archive can embed a script payload in a book note; when a victim opens the containing note and it is displayed as a grid-view preview card, the payload is injected via jQuery's html() method and executes. In the web UI this yields stored cross-site scripting in the victim's session, and on the desktop client the Electron renderer runs with Node integration enabled, so the injected JavaScript escalates to full remote code execution on the victim's machine. All Trilium deployments on version 0.103.0 or earlier, both self-hosted server instances and desktop clients, are affected; triggering the flaw requires user interaction (importing an attacker-supplied archive and then opening the note). There is no public proof-of-concept, no known in-the-wild exploitation (EPSS 0.2%, not in CISA KEV), and the issue is fixed in version 0.104.0.

What to do: Upgrade to Trilium 0.104.0, which fixes the sanitization gap. Until upgraded, do not import archives from untrusted sources and review previously imported book notes for embedded HTML/scripts; users should be cautious opening imported book notes, especially in grid view. Desktop users should prioritize patching because exploitation there results in full code execution via the Node-integrated Electron renderer.

Affected
Trilium Notes (open-source) Trilium (self-hosted server and desktop/Electron client)up to and including 0.103.0; fixed in 0.104.0
Estimated exposure
moderateon the order of tens of thousands of self-hosted instances and desktop installs — Trilium is a self-hosted open-source note-taking app with no telemetry or install counts, so the estimate is inferred from its ~30k GitHub stars and typical adoption of self-hosted personal/team note apps, and actual exploitable exposure…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Trilium is an open-source hierarchical note-taking application. In versions up to and including 0.103.0, the default-on "Safe import" filter sanitizes HTML only for text notes and excludes the book note type, whose content is stored without sanitization and later rendered as HTML, allowing an attacker-supplied import archive to embed a payload that executes as script. A book note's content is routed through the same rendering path as text notes and injected into the page with jQuery's html method when the note is shown as a grid-view preview card, so a malicious note survives Safe import and runs as soon as the victim opens the containing note. On the desktop client the Electron renderer runs with Node integration enabled, so the injected JavaScript escalates from cross-site scripting to full remote code execution on the victim's machine. This issue is fixed in version 0.104.0.

Weakness
CWE-79, CWE-94
Vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.