🇰🇷 한글 설명
MaxKB 2.7.1 이하 버전에는 저장형 XSS 취약점이 존재합니다. 프론트엔드가 LLM 응답이나 Prologue 설정의 사용자 정의 <iframe_render> 태그를 Markdown 필터링을 우회해 처리하며, sandbox="allow-scripts allow-same-origin" 설정의 iframe에 srcdoc으로 렌더링하여 삽입된 스크립트가 window.parent를 통해 상위 창에서 실행될 수 있습니다. 2.8.0 버전에서 수정되었습니다.
💡 쉬운 설명
AI 어시스턴트 화면에 악성 코드를 숨겨 넣을 수 있어, 이를 방문한 사용자의 로그인 정보나 데이터가 노출될 수 있습니다. 최신 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
MaxKB is an open-source AI assistant for enterprise. Versions 2.7.1 and below contain a Stored Cross-Site Scripting (XSS) vulnerability where the frontend's MdRenderer.vue component parses custom <iframe_render> tags from LLM responses or Application Prologue configurations, bypassing standard Markdown sanitization and XSS filtering. The unsanitized HTML content is passed to the IframeRender.vue component, which renders it directly into an <iframe> via the srcdoc attribute configured with sandbox="allow-scripts allow-same-origin". This can be a dangerous combination, allowing injected scripts to escape the iframe and execute JavaScript in the parent window using window.parent. Since the Prologue is rendered for any user visiting an application's chat interface, this results in a high-impact Stored XSS that can lead to session hijacking, unauthorized actions, and sensitive data exposure. This issue has been fixed in version 2.8.0.
📍 영향받는 시스템
MaxKB 2.7.1 이하 버전 (수정 버전: 2.8.0)
⚔️ 공격 벡터
악성 <iframe_render> 태그가 포함된 LLM 응답 또는 Prologue 설정을 저장시켜, 해당 애플리케이션 채팅 화면을 방문하는 사용자의 브라우저에서 스크립트를 실행
🛡️ 대응 방법
MaxKB를 2.8.0 이상 버전으로 업그레이드하고, 신뢰할 수 없는 Prologue 설정 및 LLM 출력을 점검
🔧 검증 코드
버전 정보가 2.8.0 미만(2.7.1 이하)으로 표시되면 취약하며, 2.8.0 이상이면 패치된 상태입니다. 버전이 확인되지 않으면 설치 경로를 직접 확인해야 합니다.
docker images | grep -i maxkb; cat /opt/maxkb/app/version 2>/dev/null; grep -ri 'maxkb' --include='*.json' --include='package.json' -l / 2>/dev/null | head -5