🔍 CVE-2026-39311

6.8
CVSS Score
MEDIUM
2026-05-20
2026-07-23 12:10
✅ 완료

🇰🇷 한글 설명

Trilium Notes 0.102.1 이하에서 SVG 파일에 대한 보안 검증 부재와 Content Security Policy 비활성화로 인해 원격 코드 실행이 가능합니다. 악의적인 SVG를 본 인증된 사용자를 통해 공격자가 CSRF 토큰을 추출하고 /api/script/exec API로 서버에서 임의의 Node.js 코드를 실행할 수 있습니다.

💡 쉬운 설명

Trilium Notes 앱이 그림 파일을 제대로 검사하지 않아서, 악의적인 파일을 본 사용자의 컴퓨터에서 나쁜 사람이 명령을 몰래 실행할 수 있습니다. 앱을 최신 버전(0.102.2 이상)으로 업데이트하면 이 문제가 해결됩니다.

🇺🇸 원문 (English)

Trilium Notes is a cross-platform, hierarchical note taking application focused on building large personal knowledge bases. Versions 0.102.1 and prior contain a critical security flaw where lack of SVG sanitization combined with a disabled Content Security Policy (CSP) and a publicly reachable backend execution API results in an unauthenticated Remote Code Execution (RCE). The vulnerability arises from an insecure-by-design architecture: Trilium serves SVG attachments with the image/svg+xml MIME type without any sanitization, and it explicitly disables Helmet's Content Security Policy middleware, removing the primary defense against script execution in served assets. Because the malicious SVG runs under the Same-Origin Policy, it can issue a fetch('/') to extract the csrfToken from the document body. With that token, it can send a signed request to /api/script/exec to execute arbitrary Node.js code on the server. An attacker can compromise the entire server instance simply by tricking an authenticated user into viewing a shared SVG attachment. The issue has been fixed in version 0.102.2.

📍 영향받는 시스템

Trilium Notes 0.102.1 이하 (모든 플랫폼)

⚔️ 공격 벡터

인증된 사용자를 악의적인 SVG 첨부파일로 유도 → SVG 스크립트가 CSRF 토큰 추출 → /api/script/exec 호출로 서버 코드 실행

🛡️ 대응 방법

Trilium Notes를 0.102.2 이상으로 즉시 업그레이드

🔧 검증 코드

설치된 trilium 버전이 표시되면 0.102.2 이상인지 확인합니다. 0.102.1 이하면 취약하므로 즉시 업그레이드 필요합니다.

Shell / Script
npm list trilium 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || dpkg -l 2>/dev/null | grep trilium | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:H

💻 영향받는 소프트웨어

Node.js