Skip to main content

Trilium CVE-2026-47727

| EUVDEUVD-2026-67238 HIGH
Code Injection (CWE-94)
2026-08-27 GitHub_M
8.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft archive with malicious EJS template
  2. Delivery
    Social engineer victim to import archive
  3. Exploit
    shareTemplate bypasses Safe Import filter
  4. Execution
    Victim publishes note enabling public share
  5. Persist
    Send unauthenticated HTTP request to share URL
  6. Impact
    Server executes attacker JavaScript via ejs.render

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three sequential conditions must be satisfied: first, a Trilium user with import privileges must import an attacker-controlled export archive - this is the step the Safe Import filter is supposed to prevent, and the bypass occurs because shareTemplate lacks the isDangerous flag; second, the same user (or any user with access to the note) must publish the imported note by enabling public sharing on it; third, the attacker must be able to send an HTTP request to the Trilium instance's public share endpoint. Exploitation is blocked if public note sharing is disabled at the application level or if the share endpoint is not reachable from the attacker's network position. Instances that have never had any notes published publicly, or that operate entirely behind a firewall with no external HTTP access, cannot be exploited at step three even if steps one and two have already occurred. The key misleading condition for defenders is that the Safe Import option appears to promise safety, giving users a false sense of protection when importing untrusted archives.

Impact

The CVSS 4.0 score of 8.6 (High) with vector AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H accurately reflects the attack profile. The UI:A (active user interaction) metric is the principal limiting factor: the attacker cannot directly reach the vulnerable code path without first convincing a legitimate Trilium user to import a malicious archive and separately publish the affected note - two distinct user actions that require social engineering. Once these conditions are met, however, the subsequent trigger is fully unauthenticated and requires only a single HTTP request to the public share URL, meaning the exploitation window is permanent until the note is unpublished or the instance is patched. No EPSS score was available in the provided intelligence data. The vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog, and no public proof-of-concept code has been identified at time of analysis. The confidentiality, integrity, and availability impact metrics are all rated High, reflecting that successful exploitation yields full Node.js server-side RCE with unrestricted filesystem and network access. Trilium instances exposed to the internet with public note sharing enabled face the highest real-world risk; private, air-gapped, or non-sharing-enabled deployments are substantially less exposed due to the social engineering prerequisite.

Exploit ScenarioDerived

An attacker crafts a Trilium export archive containing a note that holds a shareTemplate relation pointing to a companion EJS code note with a reverse-shell payload (e.g., using Node.js child_process.exec). The archive is distributed through a Trilium community forum or shared workspace as a legitimate-looking template collection. A Trilium user imports it using the built-in Safe Import option - trusting the filter to block dangerous content - and later publishes the note to share it with colleagues. The attacker then sends a single unauthenticated GET request to the public share URL, which causes the Trilium server's EJS renderer to compile and execute the payload, granting the attacker an interactive shell on the server with the full privileges of the Node.js process.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 27, 2026

Remote code execution in Trilium versions prior to 0.104.0 is achievable by exploiting a bypass in the application's Safe Import filter, which fails to mark the shareTemplate relation as dangerous. An attacker distributes a crafted export archive containing a malicious EJS template; when a user imports it and subsequently publishes the note, the public share renderer passes raw EJS content to ejs.render() in the server's Node.js process, executing attacker-controlled JavaScript with full access to the filesystem, network, and Node.js runtime. No public exploit or CISA KEV listing has been identified at time of analysis, but the detailed public advisory significantly lowers the barrier to exploit development.

RemediationAI

The vendor-released patch is Trilium version 0.104.0, which adds isDangerous: true to the shareTemplate, shareJs, and shareHtml relation definitions in the builtin_attributes configuration, causing the Safe Import filter to strip them from untrusted archives. Upgrade to 0.104.0 or later; the fix commit is available at https://github.com/TriliumNext/Trilium/commit/0db3d4403ab26de13d19a8739f014ee72b716239 and the full advisory at https://github.com/TriliumNext/Trilium/security/advisories/GHSA-c26q-6pwv-wf25. If immediate upgrade is not possible, the most effective compensating control is to disable public note sharing entirely, which prevents the EJS rendering code path from being reachable by unauthenticated requests - the trade-off is loss of the sharing feature for all users. As a secondary measure, administrators should audit all recently imported notes for shareTemplate, shareJs, or shareHtml relations and remove or sanitize them before any such notes are published. Restricting import capability to a minimal set of trusted users reduces the social engineering attack surface but does not eliminate the vulnerability if a trusted user is deceived.

Affected VersionsENISA

Trilium 0.104.0

Affected Packages

euvd trilium no fix

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 is an open-source, self-hosted hierarchical note-taking application built on Node.js (vendor: TriliumNext; CPE: cpe:2.3:a:triliumnext:trilium:*:*:*:*:*:*:*:*). It supports note 'relations' - metadata attributes that control rendering behavior - including shareTemplate, shareJs, and shareHtml, which link a note to EJS (Embedded JavaScript) template code notes. The Safe Import mechanism is designed to strip code-executing relations from imported archives by checking an isDangerous flag in packages/commons/src/lib/builtin_attributes.ts. Prior to 0.104.0, shareTemplate lacked the isDangerous: true flag (confirmed by fix commit 0db3d4403ab26de13d19a8739f014ee72b716239), allowing it to survive the filter intact. When the infected note is later published, the public share renderer invokes ejs.render() against the linked code note's raw bytes, compiling and executing them server-side. The root cause class is CWE-94 (Improper Control of Generation of Code), specifically an incomplete denylist in the Safe Import allowance logic.

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

Vendor (GitHub_M) PRIMARY 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.6 CRITICAL

No attacker privilege required; UI:R captures mandatory victim import-and-publish steps; S:C reflects attacker code executing in the server Node.js process beyond the share component.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Trilium is an open-source hierarchical note-taking application. In versions prior to 0.104.0, the default-on "Safe import" filter fails to neutralize the shareTemplate relation because that relation is not marked as dangerous, allowing an attacker-supplied import archive to plant a server-side template that leads to remote code execution. The relation is omitted from the built-in list of dangerous attributes, so unlike other code-loading relations it is not disabled on import, and when the victim later publishes the imported note the public share renderer feeds the linked EJS code note's raw bytes into ejs.render, which compiles them in the server's Node process. An unauthenticated request to the shared note then executes the attacker's JavaScript with full access to require, process, the filesystem, and the network. This issue is fixed in version 0.104.0.

Executive ViewAI

Why It Matters

Trilium users storing sensitive information in versions prior to 0.104.0 face critical risk of data compromise and system infiltration through malicious import files that execute arbitrary code with full system privileges. Organizations must immediately restrict import functionality and assess affected systems for indicators of compromise. The absence of available patches makes interim mitigations essential to prevent unauthorized data access or system-wide breach.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Implement the following interim mitigations: (1) disable or restrict the import feature to pre-approved internal sources only, preventing exposure to malicious files; (2) deploy file integrity monitoring on Trilium server directories and configuration files; (3) conduct mandatory security awareness training for all Trilium users emphasizing the risks of importing untrusted export archives; (4) isolate Trilium instances on network segments with restricted outbound connectivity to limit potential damage from code execution; (5) enable comprehensive logging and monitoring for all import and template-related activities to detect exploitation attempts; (6) maintain current, verified backups of all note data to enable recovery in case of compromise.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Low
open-source self-hosted note-taking app, niche enthusiast user base
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-68621 HIGH POC
7.4 Feb 06

Trilium Notes is an open-source, cross-platform hierarchical note taking application with focus on building large person

CVE-2022-2290 MEDIUM POC
6.1 Jul 03

Cross-site Scripting (XSS) - Reflected in GitHub repository zadam/trilium prior to 0.52.4, 0.53.1-beta. Rated medium sev

CVE-2023-3067 MEDIUM POC
5.4 Jun 02

Cross-site Scripting (XSS) - Stored in GitHub repository zadam/trilium prior to 0.59.4. Rated medium severity (CVSS 5.4)

CVE-2022-2365 MEDIUM POC
5.4 Jul 10

Cross-site Scripting (XSS) - Stored in GitHub repository zadam/trilium prior to 0.53.3. Rated medium severity (CVSS 5.4)

CVE-2026-53579 CRITICAL
9.3 Aug 27

Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium versions up to and including

CVE-2026-53578 CRITICAL
9.3 Aug 27

Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium through version 0.103.0, whe

CVE-2026-48996 CRITICAL
9.3 Aug 27

Stored cross-site scripting escalating to remote code execution affects TriliumNext Trilium through version 0.103.0, whe

CVE-2026-45668 CRITICAL
9.3 May 29

Remote code execution in TriliumNext Trilium Notes desktop client prior to 0.102.2 allows attackers to achieve arbitrary

CVE-2026-39310 HIGH
8.6 May 20

Authentication bypass in Trilium Notes Desktop (Electron build) versions 0.102.1 and earlier allows remote unauthenticat

CVE-2026-53580 HIGH
8.1 Aug 27

Arbitrary local file disclosure and denial-of-service exist in Trilium's automatic image-download feature, affecting all

CVE-2026-77438 HIGH
7.5 Aug 27

Unauthenticated content exfiltration in Trilium up to 0.103.0 is possible through the public share-search endpoint, whic

CVE-2026-39311 MEDIUM
6.8 May 20

Stored XSS-to-RCE chain in Trilium Notes versions 0.102.1 and prior allows a network attacker to execute arbitrary Node.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy