CVE-2026-39311 Details
Description
Trilium Notes is a cross-platform, hierarchical note taking application focused on building large personal knowledge bases. Versions 0.102.1 and prior contain a critical security flaw where lack of SVG sanitization combined with a disabled Content Security Policy (CSP) and a publicly reachable backend execution API results in an unauthenticated Remote Code Execution (RCE). The vulnerability arises from an insecure-by-design architecture: Trilium serves SVG attachments with the image/svg+xml MIME type without any sanitization, and it explicitly disables Helmet's Content Security Policy middleware, removing the primary defense against script execution in served assets. Because the malicious SVG runs under the Same-Origin Policy, it can issue a fetch('/') to extract the csrfToken from the document body. With that token, it can send a signed request to /api/script/exec to execute arbitrary Node.js code on the server. An attacker can compromise the entire server instance simply by tricking an authenticated user into viewing a shared SVG attachment. The issue has been fixed in version 0.102.2.
A remote code execution vulnerability has been identified in Trilium Notes versions through 0.102.1. This issue arises from the application serving SVG files without proper sanitization, combined with a disabled Content Security Policy and a publicly accessible backend execution API. As a result, an unauthenticated attacker can execute arbitrary Node.js code on the server. The vulnerability exploits the Same-Origin Policy to hijack a CSRF token from the victim's document, which is then used to send a signed request to execute malicious code.
Users are advised to update to Trilium Notes version 0.102.2 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 20, 2026CISA-ADP
Assessed May 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/TriliumNext/Trilium/security/advisories/GHSA-p837-cxw3-m964 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/TriliumNext/Trilium/releases/tag/v0.102.2 | [email protected] | Release NotesVendor |
| https://github.com/TriliumNext/Trilium/security/advisories/GHSA-p837-cxw3-m964 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Trilium Notes | <= 0.102.1 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 23, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 20, 2026 | New CVE Received | [email protected] |
| May 20, 2026 | CVE Modified | CISA-ADP |
Volerion