Trilium · Trilium · CVE-2026-47727
**Name of the Vulnerable Software and Affected Versions**
Trilium versions prior to 0.104.0
**Description**
The Safe import filter fails to neutralize the `shareTemplate` relation because it is not marked as dangerous. This allows an attacker to provide a malicious import archive that plants a server-side template. When the victim publishes the imported note, the public share renderer passes the raw bytes of the linked EJS (Embedded JavaScript templates) code note into the `ejs.render()` function, which compiles them within the server's Node process. Consequently, an unauthenticated request to the shared note executes the attacker's JavaScript, granting full access to `require`, `process`, the filesystem, and the network, leading to remote code execution.
**Recommendations**
Update to version 0.104.0.