🇰🇷 한글 설명
RAGFlow 0.26.3 이전 버전은 에이전트 파이프라인(DSL)의 노드 이름을 sanitize하지 않고 저장합니다. 이 이름이 dataflow-result 웹 UI의 '현재 단계부터 재실행' 확인 모달에 dangerouslySetInnerHTML로 렌더링되며, i18next 설정의 escapeValue:false로 인해 HTML 인코딩 없이 DOM에 삽입되어 스크립트 실행이 가능합니다.
💡 쉬운 설명
같은 워크스페이스의 인증된 사용자가 에이전트 노드 이름에 악성 스크립트를 숨겨 두면, 다른 구성원이 결과를 열고 재실행 버튼을 누를 때 그 스크립트가 실행됩니다. 이로 인해 세션 정보가 탈취되어 계정이 장악될 수 있습니다.
🇺🇸 원문 (English)
RAGFlow before 0.26.3 stores an agent pipeline (DSL) node name without sanitization: the agent update endpoint normalizes the submitted DSL via normalize_dsl, which only performs JSON serialization validation and preserves the node name verbatim. The dataflow-result web UI then renders that name into the "Rerun from current step" confirmation modal via dangerouslySetInnerHTML, and the i18next configuration sets escapeValue:false, so the value is inserted into the DOM without HTML encoding. An authenticated workspace user who can create or edit an agent can inject arbitrary JavaScript that executes in the session of another workspace member who opens the dataflow result and clicks rerun, enabling session/token theft and account takeover across the user trust boundary.
📍 영향받는 시스템
RAGFlow 0.26.3 미만 버전
⚔️ 공격 벡터
워크스페이스 사용자가 에이전트 DSL 노드 이름에 악성 JavaScript를 삽입하고, 피해자가 dataflow 결과에서 재실행을 클릭하면 세션 토큰이 탈취됩니다.
🛡️ 대응 방법
RAGFlow를 0.26.3 이상으로 업그레이드하고, 노드 이름 입력값에 대한 서버 측 검증 및 UI의 HTML 이스케이프(escapeValue:true 설정 또는 텍스트 노드 렌더링)를 적용합니다.
🔧 검증 코드
출력된 버전이 0.26.3 미만이면 취약하므로 업그레이드가 필요하며, 0.26.3 이상이면 패치가 적용된 것입니다. 버전 정보가 나오지 않으면 설치 경로를 직접 확인해야 합니다.
ragflow --version 2>/dev/null || grep -rE '"version"|RAGFLOW_VERSION' /opt/ragflow/VERSION /app/VERSION 2>/dev/null | head -1