Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 79%

CVE-2026-39311: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in TriliumNext Trilium

0
Medium
VulnerabilityCVE-2026-39311cvecve-2026-39311cwe-79cwe-94
Published: 05/20/2026 (05/20/2026, 19:13:00 UTC)
Source: CVE Database V5
Vendor/Project: TriliumNext
Product: Trilium

Description

Trilium Notes versions 0.102.1 and earlier contain a critical vulnerability due to lack of SVG sanitization combined with a disabled Content Security Policy and a publicly accessible backend API. This flaw allows an attacker to execute arbitrary Node.js code on the server by tricking an authenticated user into viewing a malicious SVG attachment. The vulnerability arises from serving SVGs without sanitization and disabling Helmet's CSP middleware, enabling script execution under the Same-Origin Policy. The issue is fixed in version 0.102.2.

CVSS v3.1

Score 6.8medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
High
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:H

Affected software

GitHub Actionsmore threats →ai
triliumnext/Trilium
pkg:github/triliumnext/Trilium
Affected versions
<0.102.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/27/2026, 21:02:59 UTC

Technical Analysis

CVE-2026-39311 affects Trilium Notes versions prior to 0.102.2. The vulnerability is caused by improper neutralization of input during web page generation (CWE-79) and insecure code execution (CWE-94). Trilium serves SVG attachments with the image/svg+xml MIME type without sanitization and disables the Content Security Policy middleware, allowing malicious SVGs to execute scripts in the context of the application. These scripts can extract CSRF tokens and send signed requests to the /api/script/exec endpoint, resulting in unauthenticated remote code execution on the server. This is due to an insecure-by-design architecture and a publicly reachable backend execution API. The vulnerability has been addressed in version 0.102.2.

Potential Impact

An attacker can achieve unauthenticated remote code execution on the Trilium server by leveraging a malicious SVG attachment viewed by an authenticated user. This can lead to full compromise of the server instance, including execution of arbitrary Node.js code. The CVSS score is 6.8 (medium severity), reflecting the complexity and required user interaction but significant impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade Trilium Notes to version 0.102.2 or later, where this vulnerability has been fixed. The fix addresses SVG sanitization and re-enables Content Security Policy protections. Until upgraded, avoid opening or sharing SVG attachments from untrusted sources. Patch status is confirmed fixed in version 0.102.2.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-06T19:31:07.265Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a0e0ccfba1db473629e776f

Added to database: 05/20/2026, 19:34:39 UTC

Last enriched: 05/27/2026, 21:02:59 UTC

Last updated: 07/04/2026, 04:20:04 UTC

Views: 63

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses