CVE-2026-45733: Trilium: Stored XSS in note icon rendering leads to Remote Code Execution in Electron desktop app
Trilium Notes is a cross-platform, hierarchical note taking application focused on building large personal knowledge bases. Prior to 0.103.0, the #iconClass label value is returned raw by getNoteIcon() and inserted without HTML attribute encoding into class attributes in apps/client/src/widgets/quicksearch.ts and apps/client/src/services/noteautocomplete.ts, allowing a stored payload to execute automatically when a victim opens a new tab or uses Ctrl+J and, because Electron enables nodeIntegration and disables contextIsolation, run operating-system commands as the victim. This issue is fixed in version 0.103.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Trilium Notes Electron desktop appto a version that resolves this vulnerability.Fixed in 0.103.0
Event History
Frequently Asked Questions
What access and user action are required for exploitation?
An attacker needs the ability to store a crafted #iconClass label value in a note that the victim can access. Exploitation then requires victim interaction: opening a new tab or invoking quick search with Ctrl+J, which renders the stored value.
Which versions are affected and what is the fix?
Versions before 0.103.0 are affected. Upgrade to 0.103.0, which fixes the unsafe handling of #iconClass values.
What is the practical impact after the stored script executes?
Successful payload execution occurs in the Electron desktop application and can run operating-system commands with the privileges of the victim. This is possible because nodeIntegration is enabled and contextIsolation is disabled.