🇰🇷 한글 설명
ApostropheCMS에서 사용하는 sanitize-html 2.18.0 미만 버전에서 발생하는 취약점입니다. noscript 태그를 포함한 특정 설정 시 HTML 파서가 태그 종료 지점을 잘못 인식하여, 제거되어야 할 스크립트 콘텐츠가 필터링을 통과하고 실행될 수 있습니다.
💡 쉬운 설명
웹사이트에서 위험한 코드를 지워주는 청소 도구가 특정 태그를 처리할 때 실수로 위험한 코드를 남겨두는 문제입니다. 이로 인해 공격자가 의도한 악성 스크립트가 사용자 브라우저에서 실행될 수 있습니다.
🇺🇸 원문 (English)
ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. Prior to sanitize-html 2.18.0, a non-default nonTextTags configuration that includes noscript can end its discard region early when htmlparser2 emits an implied ancestor close inside noscript. Because scripting-enabled browsers treat noscript content as raw text while the parser does not model that mode, content intended to remain inert can survive sanitization and render; the issue does not generalize to every default nonTextTags element. This issue is fixed in sanitize-html 2.18.0.
📍 영향받는 시스템
sanitize-html 2.18.0 미만 버전이 포함된 시스템 (예: ApostropheCMS)
⚔️ 공격 벡터
sanitizer 설정에 noscript가 포함된 경우, 특수하게 조작된 HTML을 입력하여 필터링을 우회하는 방식
🛡️ 대응 방법
sanitize-html 라이브러리를 2.18.0 이상 버전으로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 2.18.0 미만 버전이 출력되면 취약한 상태이며, 아무것도 출력되지 않으면 안전합니다.
npm list sanitize-html | grep -E 'sanitize-html@([0-1]\.|2\.[0-1]\.[0-7])'