🇰🇷 한글 설명
MISP의 이벤트 REST 검색 내보내기 확인 양식에서 반사형 XSS 취약점이 발견되었습니다. PHP의 json_encode() 함수가 작은따옴표를 이스케이프하지 않는 특성을 악용하여, 공격자가 조작된 URL을 통해 피해자의 브라우저에서 임의의 자바스크립트를 실행할 수 있습니다.
💡 쉬운 설명
공격자가 만든 특수한 링크를 클릭하면, 사용자의 웹 브라우저에서 몰래 악성 코드가 실행될 수 있는 보안 약점입니다. 이를 통해 공격자는 사용자의 로그인 정보를 훔치거나 계정 권한을 도용할 수 있습니다.
🇺🇸 원문 (English)
MISP contains a reflected cross-site scripting (XSS) vulnerability in the event REST search export confirmation form. The view template app/View/Events/ajax/eventRestSearchExportConfirmationForm.ctp renders a URL-supplied event ID list into a single-quoted JavaScript string literal using PHP's json_encode() without any hex-encoding flags. By default, json_encode() escapes double quotes and backslashes but does not escape single quotes. Because the JavaScript string is delimited by single quotes, an attacker can inject a single-quote character to terminate the string literal and execute arbitrary JavaScript in the victim's browser session.
The vulnerability affects the Default and UiBeta themes, both of which render this view. The Overmind theme's own copy of the form already passed the value through an escaped data attribute and was not affected by this specific sink.
Preconditions: the victim must be an authenticated MISP user and must actively open or navigate to the attacker-crafted URL. The attacker does not require an account or any prior access to the MISP instance.
Security impact: successful exploitation allows execution of arbitrary JavaScript in the context of the MISP web application, potentially leading to session hijacking, unauthorized actions performed on behalf of the victim, exfiltration of sensitive data visible in the session, or further client-side attacks. The vulnerable component's own confidentiality, integrity, and availability are not directly compromised; the impact is on the underlying user session.
📍 영향받는 시스템
MISP (Default 및 UiBeta 테마 사용 시 영향, Overmind 테마는 제외)
⚔️ 공격 벡터
공격자가 조작된 이벤트 ID 리스트가 포함된 URL을 인증된 사용자에게 전달하여 클릭을 유도함
🛡️ 대응 방법
해당 취약점이 해결된 최신 버전의 MISP로 업데이트하거나, 템플릿 내 자바스크립트 문자열 처리 방식을 수정해야 함
🔧 검증 코드
해당 파일이 존재하고 소스 코드 내에 json_encode()를 사용하는 로직이 있는지 확인하여 취약 여부를 판단합니다.
grep -r "eventRestSearchExportConfirmationForm.ctp" /var/www/misp/app/View/Events/ajax/ 2>/dev/null