Skip to content

fix(security): ContentRenderer XSS — LLM 생성 콘텐츠 미검증 렌더링 #95

@greenheadHQ

Description

@greenheadHQ

Summary

ContentRenderer.tsx에서 dangerouslySetInnerHTML로 LLM 생성 콘텐츠를 sanitize 없이 렌더링. markdown-ithtml: true 설정이 위험을 증폭.

Context

  • renderAnkiContent()는 DOMPurify 등 XSS 필터 없음
  • LLM이 생성한 splitCards[].contentSplitHistory, DiffViewer를 통해 렌더링됨
  • <script>, <img onerror=...>, <svg onload=...> 등 LLM hallucination으로 XSS 페이로드 가능

Proposed Changes

  • renderAnkiContent() 출력에 DOMPurify 적용
  • 또는 markdown-it의 html: truefalse로 변경하고 필요한 HTML만 allowlist로 허용

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:security보안, 인증, 비밀정보, 데이터 보호area:webReact 웹 애플리케이션bugSomething isn't workingpriority:high즉시 대응이 필요한 작업

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions