🇰🇷 한글 설명
SiYuan 개인 지식 관리 시스템의 3.6.0 이하 버전에서 모바일 파일 트리 렌더링 시 HTML 이스케이프 처리가 누락된 취약점이 발견되었습니다. 인증된 사용자가 노트북 이름을 변경하여 악성 스크립트를 삽입할 수 있으며, Electron 설정 문제로 인해 단순 XSS를 넘어 원격 코드 실행(RCE)까지 가능합니다.
💡 쉬운 설명
노트북 이름을 바꿀 수 있는 사람이 몰래 악성 코드를 심어둘 수 있는 보안 구멍이 있습니다. 이 코드가 실행되면 공격자가 사용자의 컴퓨터를 완전히 제어할 수 있어 매우 위험합니다.
🇺🇸 원문 (English)
SiYuan is a personal knowledge management system. In versions 3.6.0 and below, the mobile file tree (MobileFiles.ts) renders notebook names via innerHTML without HTML escaping when processing renamenotebook WebSocket events. The desktop version (Files.ts) properly uses escapeHtml() for the same operation. An authenticated user who can rename notebooks can inject arbitrary HTML/JavaScript that executes on any mobile client viewing the file tree. Since Electron is configured with nodeIntegration: true and contextIsolation: false, the injected JavaScript has full Node.js access, escalating stored XSS to full remote code execution. The mobile layout is also used in the Electron desktop app when the window is narrow, making this exploitable on desktop as well. This issue has been fixed in version 3.6.1.
📍 영향받는 시스템
SiYuan 3.6.0 및 그 이하 모든 버전
⚔️ 공격 벡터
인증된 사용자가 노트북 이름을 악성 HTML/JavaScript로 변경하여 WebSocket 이벤트를 통해 전파
🛡️ 대응 방법
SiYuan을 최신 보안 패치가 적용된 3.6.1 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 3.6.1 미만(3.6.0 이하)인 경우 취약한 상태입니다.
curl -s http://localhost:PORT/api/version | grep -E '3\.[0-6]\.[0-1]'