🇰🇷 한글 설명
savg-sanitizer 1.0.0 미만 버전에서 XML 엔티티 확장 과정의 논리적 오류로 인해 발생하는 XSS 취약점입니다. 공격자가 조작된 엔티티를 포함한 SVG 파일을 업로드하면, 검사기를 통과한 후 HTML 렌더링 과정에서 자바스크립트 URL이 활성화되어 악성 스크립트가 실행될 수 있습니다.
💡 쉬운 설명
이미지 파일 안에 숨겨진 특수 코드가 보안 검사를 교묘히 피해가는 문제입니다. 이 파일을 웹사이트에서 열면 공격자가 심어놓은 악성 프로그램이 사용자의 브라우저에서 실행될 수 있습니다.
🇺🇸 원문 (English)
savg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, svg-sanitizer's isHrefSafeValue() validates an SVG href after XML DTD entity expansion, but saveXML() serializes the original entity reference after removing the DTD declaration. A crafted entity such as Tab can appear to the sanitizer as a safe fragment prefix while HTML5 Named Character Reference resolution during inline HTML rendering later converts the surviving reference to whitespace, exposing a javascript: URL. When an application embeds the sanitized SVG inline, a user who activates the link can cause script to execute in the embedding page's origin. This issue is fixed in version 1.0.0.
📍 영향받는 시스템
savg-sanitizer version < 1.0.0
⚔️ 공격 벡터
조작된 XML 엔티티가 포함된 SVG 파일을 업로드하여 브라우저에서 실행 유도
🛡️ 대응 방법
savg-sanitizer를 1.0.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 1.0.0 미만이면 취약한 상태입니다.
composer show savg-sanitizer 2>/dev/null | grep -E 'versions'