Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconUpload malicious SVG attachment
-
DeliveryGenerate public share link
-
ExploitPhish authenticated user to open link
-
InstallBrowser executes SVG JavaScript on Trilium origin
-
C2Fetch CSRF token from document body
-
ExecutePOST signed request to /api/script/exec
-
ImpactExecute arbitrary Node.js on server
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated Trilium user to open the malicious SVG attachment in their browser while logged into the same Trilium instance - the SVG must be served as a top-level document from the application origin, not embedded via an img tag in a sanitized context. The attacker must have the ability to upload or place the SVG attachment within Trilium (the exact privilege level required for this step is not confirmed by the available data and conflicts with the PR:H CVSS rating versus the description's 'unauthenticated' claim - treat this as unresolved). The backend /api/script/exec endpoint must be reachable from the application origin, which is a default condition. Exploitation is limited by the requirement for user interaction (UI:R): the attack fails if no authenticated user views the SVG. The high attack complexity (AC:H) further limits exploitation by requiring the attacker to successfully social-engineer a specific authenticated user into clicking the share link. |
| Impact | The CVSS 3.1 base score of 6.8 with vector AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:H presents notable inconsistencies against the written description that security teams should verify before deprioritizing this finding. The description explicitly characterizes the vulnerability as enabling 'unauthenticated Remote Code Execution,' yet the CVSS vector encodes PR:H, indicating the scorer believed the attacker requires high-privilege credentials - this conflict is not explained in the available data and should be clarified with the vendor or by reviewing GHSA-p837-cxw3-m964 in detail. The AC:H designation may reflect the social engineering prerequisite (tricking an authenticated user to view the SVG), but it arguably understates ease of exploitation given that public SVG share links are a normal use case. Similarly, the impact subscores of C:L and I:L seem conservative for a vulnerability that reaches /api/script/exec and can execute arbitrary Node.js - full server compromise (C:H/I:H) is plausible; the A:H designation alone suggests the scorer acknowledged severe downstream impact. No EPSS score was available. No CISA KEV listing exists, indicating no confirmed mass exploitation. Despite the moderate CVSS score, the technical severity of the chained attack (XSS → CSRF exfiltration → server-side RCE) and the public advisory detail make this a high-priority patch for any Trilium instance with share functionality exposed to untrusted parties. |
| Exploit ScenarioDerived | An attacker crafts an SVG file containing embedded JavaScript that, when rendered by a browser as a top-level document from the Trilium origin, issues a fetch('/') request to extract the CSRF token from the DOM and then posts that token to /api/script/exec with a Node.js payload that, for example, spawns a reverse shell or exfiltrates server credentials. The attacker uploads this SVG as an attachment within a Trilium note, generates a public share link, and distributes it via phishing or embeds it in content the target user will visit while authenticated in the same browser. No public exploit code (POC) has been confirmed in the provided intelligence, but the GitHub security advisory provides sufficient technical detail to reconstruct the chain. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 20, 2026
Stored XSS-to-RCE chain in Trilium Notes versions 0.102.1 and prior allows a network attacker to execute arbitrary Node.js code on the server by tricking an authenticated user into viewing a malicious SVG attachment. The vulnerability exploits three compounding design flaws - unsanitized SVG serving with the image/svg+xml MIME type, a deliberately disabled Content Security Policy, and an unauthenticated-from-same-origin script execution endpoint at /api/script/exec - enabling full server compromise through a single user interaction. No public exploit code or CISA KEV listing has been identified at time of analysis, but the detailed disclosure in the GitHub security advisory provides a near-complete attack recipe; EPSS data was not available in the provided intelligence.
RemediationAI
Upgrade immediately to Trilium Notes v0.102.2, which the vendor release notes at https://github.com/TriliumNext/Trilium/releases/tag/v0.102.2 describe as containing 'important security fixes' and which specifically addresses SVG handling in share routes and the main API, re-enables content security controls, and hardens the Electron desktop application. The vendor strongly encourages updating before the next scheduled release. No workarounds that fully mitigate the chained attack are documented by the vendor. As a partial compensating control while patching, operators can restrict access to Trilium's share routes at the network or reverse-proxy layer - blocking unauthenticated external access to share URLs prevents untrusted parties from delivering the malicious SVG to authenticated users, though this does not protect against insider-threat scenarios where an internal attacker has upload access. Disabling the /api/script/exec endpoint is not straightforward without code changes and would break legitimate scripting functionality.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Trilium Notes (cpe:2.3:a:triliumnext:trilium:*:*:*:*:*:*:*:*) is a Node.js-based hierarchical knowledge base application. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation / Cross-site Scripting), specifically stored XSS via SVG attachments. When browsers fetch an SVG served with the Content-Type image/svg+xml as a top-level document - rather than as an embedded img element - they execute any embedded script tags. Trilium's backend serves SVG attachments with this MIME type without stripping JavaScript, and Helmet's CSP middleware is explicitly disabled in the application, removing the primary browser-side defense against inline script execution. Because the malicious SVG is served from the application's own origin, the Same-Origin Policy permits the embedded JavaScript to read the application's DOM (extracting a CSRF token from the page body) and issue credentialed fetch requests to backend API endpoints. The /api/script/exec endpoint accepts a CSRF-signed POST and executes arbitrary Node.js code server-side, completing the escalation from stored XSS to full server-side code execution.
Know when Trilium gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Trilium Notes is an open-source, cross-platform hierarchical note taking application with focus on building large person
Cross-site Scripting (XSS) - Reflected in GitHub repository zadam/trilium prior to 0.52.4, 0.53.1-beta. Rated medium sev
Cross-site Scripting (XSS) - Stored in GitHub repository zadam/trilium prior to 0.59.4. Rated medium severity (CVSS 5.4)
Cross-site Scripting (XSS) - Stored in GitHub repository zadam/trilium prior to 0.53.3. Rated medium severity (CVSS 5.4)
Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium versions up to and including
Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium through version 0.103.0, whe
Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium through version 0.103.0, whe
Remote code execution in TriliumNext Trilium Notes desktop client prior to 0.102.2 allows attackers to achieve arbitrary
Remote code execution in Trilium versions prior to 0.104.0 is achievable by exploiting a bypass in the application's Saf
Authentication bypass in Trilium Notes Desktop (Electron build) versions 0.102.1 and earlier allows remote unauthenticat
Arbitrary local file disclosure and denial-of-service exist in Trilium's automatic image-download feature, affecting all
Unauthenticated content exfiltration in Trilium up to 0.103.0 is possible through the public share-search endpoint, whic
EUVD-2026-31173
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB