🇰🇷 한글 설명
MaxKB 2.7.1 이하 버전에는 인증된 사용자가 애플리케이션 프롤로그(오프닝 멘트) 필드에 <html_rander> 태그로 감싼 악성 HTML/JavaScript를 주입할 수 있는 저장형 XSS 취약점이 존재합니다. 백엔드가 해당 필드를 살균하거나 인코딩하지 않고 그대로 저장하며, 프론트엔드는 이를 innerHTML과 유사한 방식으로 렌더링하여 챗봇에 접속하는 모든 방문자에게 스크립트가 실행됩니다.
💡 쉬운 설명
챗봇 시작 문구에 악성 코드를 숨겨 넣으면, 그 챗봇을 여는 사람의 브라우저에서 해당 코드가 실행됩니다. 이를 통해 세션 탈취나 관리자 권한 작업 대리 실행이 가능해질 수 있습니다.
🇺🇸 원문 (English)
MaxKB is an open-source AI assistant for enterprise. Versions 2.7.1 and below contain a Stored Cross-Site Scripting (XSS) vulnerability that allows authenticated users to inject arbitrary HTML and JavaScript into the Application prologue (Opening Remarks) field by wrapping malicious payloads in <html_rander> tags. The backend fails to sanitize or encode HTML entities in the prologue field when applications are created or updated via the /admin/api/workspace/{workspace_id}/application endpoint, storing the raw payload directly in the database. The frontend then renders this content using an innerHTML-equivalent mechanism, trusting <html_rander>-wrapped content to be safe, which enables persistent DOM-based Stored XSS execution against any visitor who opens the affected chatbot interface. Exploitation can lead to session hijacking, unauthorized actions performed on behalf of victims (such as deleting workspaces or applications), and sensitive data exposure. This issue has been fixed in version 2.8.0.
📍 영향받는 시스템
MaxKB 2.7.1 이하 버전 (2.8.0에서 수정됨)
⚔️ 공격 벡터
인증된 사용자가 애플리케이션 프롤로그 필드에 <html_rander> 래퍼로 감싼 악성 스크립트를 저장하고, 피해자가 해당 챗봇 인터페이스를 열면 실행됨
🛡️ 대응 방법
MaxKB를 2.8.0 이상 버전으로 업그레이드하고, 기존 프롤로그 필드에 저장된 의심스러운 <html_rander> 콘텐츠를 점검
🔧 검증 코드
출력된 버전이 2.8.0 미만(예: 2.7.x 이하)이면 취약하며, 2.8.0 이상이면 패치된 것입니다. 명령 결과가 없으면 설치 경로를 직접 확인해야 합니다.
docker exec $(docker ps -qf ancestor=cr2.fit2cloud.com/1panel/maxkb) cat /opt/maxkb/app/VERSION 2>/dev/null || grep -rho 'version["=: ]*[0-9.]*' /opt/maxkb 2>/dev/null | head -1