🇰🇷 한글 설명
Apache Storm UI의 시각화 컴포넌트가 토폴로지 메타데이터(컴포넌트 ID, 스트림 이름, 그루핑 값)를 이스케이프 없이 innerHTML로 삽입하여 저장형 XSS가 발생합니다. 토폴로지 제출 권한을 가진 인증된 사용자가 악성 스크립트를 포함한 토폴로지를 등록하면 관리자 브라우저에서 스크립트가 실행될 수 있습니다.
💡 쉬운 설명
토폴로지를 등록할 수 있는 일반 사용자가 이름에 악성 코드를 숨겨두면, 관리자가 Storm UI를 열 때 그 코드가 관리자 브라우저에서 실행됩니다. 이를 통해 관리자 권한을 탈취할 수 있습니다.
🇺🇸 원문 (English)
Stored Cross-Site Scripting (XSS) via Unsanitized Topology Metadata in Apache Storm UI
Versions Affected: before 2.8.6
Description: The Storm UI visualization component interpolates topology metadata including component IDs, stream names, and grouping values directly into HTML via innerHTML in parseNode() and parseEdge() without sanitization at any layer. An authenticated user with topology submission rights could craft a topology containing malicious HTML/JavaScript in component identifiers (e.g., a bolt ID containing an onerror event handler). This payload flows through Nimbus → Thrift → the Visualization API → vis.js tooltip rendering, resulting in stored cross-site scripting.
In multi-tenant deployments where topology submission is available to less-trusted users but the UI is accessed by operators or administrators, this enables privilege escalation through script execution in an admin's browser session.
Mitigation: 2.x users should upgrade to 2.8.6. Users who cannot upgrade immediately should monkey-patch the parseNode() and parseEdge() functions in the visualization JavaScript file to HTML-escape all API-supplied values including nodeId, :capacity, :latency, :component, :stream, and :grouping before interpolation into tooltip HTML strings, and should additionally restrict topology submission to trusted users via Nimbus ACLs as a defense-in-depth measure. A guide on how to do this is available in the release notes of 2.8.6.
Credit: This issue was discovered while investigating another report by K.
📍 영향받는 시스템
Apache Storm 2.8.6 미만 버전 (2.x 사용자 영향)
⚔️ 공격 벡터
토폴로지 제출 권한을 가진 사용자가 컴포넌트 ID 등에 악성 HTML/JavaScript를 삽입한 토폴로지를 제출하여 관리자 UI에서 저장형 XSS 실행
🛡️ 대응 방법
Apache Storm 2.8.6 이상으로 업그레이드하며, 즉시 업그레이드가 어려우면 parseNode()/parseEdge() 함수의 값을 HTML 이스케이프 처리하고 Nimbus ACL로 토폴로지 제출 권한을 신뢰된 사용자로 제한
🔧 검증 코드
출력된 버전이 2.8.6 미만이면 취약하므로 업그레이드가 필요하며, 2.8.6 이상이면 패치가 적용된 것입니다. 출력이 없으면 Storm JAR을 찾지 못한 것이므로 설치 경로를 직접 확인하세요.
find / -name 'storm*.jar' 2>/dev/null | head -n 1 | xargs -I{} unzip -p {} META-INF/MANIFEST.MF 2>/dev/null | grep -i 'Implementation-Version'