🇰🇷 한글 설명
ApostropheCMS에서 사용하는 sanitize-html 라이브러리의 취약점으로, SVG SMIL URL 세만틱 처리 오류로 인해 발생합니다. 특정 애니메이션 속성 내에 안전한 값 뒤에 실행 가능한 목적지를 숨겨둘 경우, 브라우저가 이를 실행하여 애플리케이션의 권한으로 스크립트를 실행할 수 있습니다.
💡 쉬운 설명
웹사이트의 HTML을 깨끗하게 청소해주는 도구가 특정 애니메이션 코드 속에 숨겨진 악성 링크를 찾아내지 못하는 문제입니다. 공격자가 이 허점을 이용해 사용자 몰래 나쁜 코드를 실행하게 만들 수 있습니다.
🇺🇸 원문 (English)
ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. From version 1.9.0 until version 2.17.7, packages/sanitize-html/index.js validates an animation value attribute as one flat URL and does not recognize that attributeName selecting href or xlink:href gives the sibling values, from, to, or by attribute SVG SMIL URL semantics. In configurations that allow the animate, animateColor, animateMotion, animateTransform, or set elements, a values list can begin with a safe fragment and contain a later executable destination that survives allowedSchemesAppliedToAttributes checking. When the sanitized SVG is rendered, the browser can copy that later destination into the live link, and a victim who activates the link can execute script in the application's origin. This issue is fixed in version 2.17.7.
📍 영향받는 시스템
sanitize-html version 1.9.0 ~ 2.17.7
⚔️ 공격 벡터
악성 스크립트가 포함된 SVG 애니메이션 태그를 삽입하여 브라우저에서 실행 유도
🛡️ 대응 방법
sanitize-html 라이브러리를 2.17.7 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 2.17.7 미만(1.9.0 이상)이면 취약한 상태입니다.
npm list sanitize-html | grep -E 'sanitize-html@([0-9]+\.[0-9]+\.[0-9]+)'