CVE-2026-47727
Description
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.
Weakness
- CWE-94: Improper Control of Generation of Code
- CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-08-29 |
Timeline
- 2026-08-27Published by the CNA16:51 UTC
- 2026-08-29CISA SSVC decision recorded2 days after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| triliumnotes trilium | before 0.104.0fixed in 0.104.0 | 0.104.0 |
References
- https://github.com/TriliumNext/Trilium/commit/0db3d4403ab26de13d19a8739f014ee72b716239
- https://github.com/TriliumNext/Trilium/security/advisories/GHSA-c26q-6pwv-wf25
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-47727'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-47727'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-47727'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-47727'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).