Remote code execution via unfiltered shareTemplate relation
Published Aug 27, 2026 · Updated Aug 27, 2026
Code injection in Trilium Notes before 0.104.0 allows remote attackers to execute code through a crafted imported note. The Safe import allowlist omits shareTemplate, so the public share renderer passes attacker-controlled EJS bytes to ejs.render in the server's Node process. Execution requires a user to import the archive and publish the note; an unauthenticated share request then runs JavaScript with filesystem and network access.
Summary
What happened
Code injection in Trilium Notes before 0.104.0 allows remote attackers to execute code through a crafted imported note. The Safe import allowlist omits shareTemplate, so the public share renderer passes attacker-controlled EJS bytes to ejs.render in the server's Node process. Execution requires a user to import the archive and publish the note; an unauthenticated share request then runs JavaScript with filesystem and network access.
The record
- CVE
- CVE-2026-47727
- Published
- Aug 27, 2026
- Updated
- Aug 27, 2026
- Vendor
- Trilium Next
- Product
- Trilium Notes
- Classifications
- CWE-1336, CWE-94, T1204.002
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Aug 27, 2026CVE publishedPublication date reported by the CVE source.
- Aug 27, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0.104.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GHSA-c26q-6pwv-wf25 crafted import archive proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo