🇰🇷 한글 설명
SiYuan v3.8.3 버전에서 Markdown의 Kramdown 인라인 속성 리스트(IAL)를 처리할 때 data-subtype 속성에 대한 HTML 이스케이프 처리가 누락되는 취약점이 발견되었습니다. 공격자가 특수하게 조작된 Markdown을 붙여넣으면 브라우저가 이를 재파싱하는 과정에서 임의의 속성을 주입할 수 있으며, 특히 Node.js 통합이 활성화된 Electron 데스크톱 앱에서는 원격 코드 실행(RCE)으로 이어질 수 있습니다.
💡 쉬운 설명
악의적으로 작성된 텍스트를 프로그램에 복사하여 붙여넣기만 해도 해커가 사용자의 컴퓨터를 제어할 수 있는 위험한 보안 결함입니다. 이 문제는 프로그램이 텍스트를 처리하는 과정에서 특수 문자를 제대로 걸러내지 못해 발생합니다.
🇺🇸 원문 (English)
SiYuan v3.8.3 fails to HTML-escape the data-subtype attribute when generating gutter-button markup (app/src/protyle/gutter/button.ts, assigned via innerHTML in app/src/protyle/gutter/index.ts) from content pasted as plain-text Markdown containing a Kramdown inline attribute list (IAL). Because the shared Lute renderer parses Kramdown IAL from text/plain input, an attacker-supplied Markdown snippet using entity-encoded quotes in data-subtype breaks out of the attribute value when the gutter markup is re-parsed by the browser, injecting additional attributes such as autofocus and onfocus. If a victim pastes the crafted Markdown and the affected gutter control receives focus, the injected handler executes; in the Electron desktop application, where the main BrowserWindow enables Node integration and disables context isolation, this results in JavaScript execution with renderer Node.js privileges (remote code execution). Fixed in v3.8.4.
📍 영향받는 시스템
SiYuan v3.8.3 이하 버전 (Electron 데스크톱 애플리케이션 포함)
⚔️ 공격 벡터
공격자가 조작된 Markdown 콘텐츠를 피해자가 붙여넣도록 유도하여 HTML 속성 주입 및 JavaScript 실행
🛡️ 대응 방법
SiYuan을 최신 보안 패치가 적용된 v3.8.4 이상 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 v3.8.4 미만인 경우 해당 취약점에 노출되어 있으므로 즉시 업데이트가 필요합니다.
grep -r "version" /path/to/siyuan/package.json 2>/dev/null || echo 'Check application version via UI'