🇰🇷 한글 설명
MISP에서 REST 요청 여부에 따라 CSRF 및 폼 보안 보호 기능을 비활성화하는 취약점이 발견되었습니다. 공격자가 HTTP Accept 헤더를 조작하여 일반 요청을 REST 요청으로 위장하면, 인증된 사용자의 세션을 이용해 권한 없는 데이터 수정이나 삭제를 수행할 수 있습니다.
💡 쉬운 설명
로그인된 사용자가 악성 웹사이트를 방문하기만 해도, 사용자의 권한을 도용해 MISP 시스템의 데이터를 몰래 바꾸거나 삭제할 수 있는 보안 허점입니다. 공격자가 요청의 형식을 속여 보안 검사를 우회하는 방식으로 작동합니다.
🇺🇸 원문 (English)
A cross-site request forgery (CSRF) vulnerability exists in MISP due to form-security and CSRF protections being disabled based on whether an incoming request was identified as a REST request.
MISP's REST detection can be influenced by request properties such as the URL suffix or the HTTP Accept header. Because Accept: application/json can be supplied by a cross-origin page without requiring a CORS preflight, an attacker could cause a request originating from another website to be treated as REST traffic. MISP would consequently disable its normal form-security and CSRF validation even though the request was authenticated using the victim's existing browser session.
An unauthenticated remote attacker could exploit this behavior by convincing an authenticated MISP user to visit or interact with a malicious web page. The attacker's page could then issue crafted requests to susceptible state-changing MISP endpoints using the victim's privileges. Depending on the permissions of the victim and the targeted endpoint, this could allow unauthorized modification, creation, publication, or removal of data and other state changes.
The vulnerability originates from granting the form-security exemption based on _isRest() rather than on the authentication mechanism used by the request. The patch changes this behavior so that CSRF and form-security exemptions are granted only when the request actually carries a MISP API key. Session-authenticated REST-style requests remain subject to CSRF protection.
The fix also introduces support for transmitting CSRF tokens through the X-CSRF-Token header for legitimate same-origin AJAX requests. Such a header cannot normally be attached by a cross-origin page without triggering a CORS preflight, preventing it from being used to reproduce the original attack.
📍 영향받는 시스템
MISP (특정 버전 명시되지 않음, 패치 적용 전 버전)
⚔️ 공격 벡터
사용자를 악성 페이지로 유인하여 조작된 HTTP Accept 헤더를 포함한 CSRF 요청을 전송
🛡️ 대응 방법
CSRF 면제 조건을 API 키 사용 여부로 변경하고, X-CSRF-Token 헤더를 지원하는 최신 패치 적용
🔧 검증 코드
REST 요청으로 위장된 요청이 CSRF 보호 없이 상태 변경을 수행하는지 확인하거나 패치된 버전의 보안 헤더 적용 여부를 검토
curl -I -H 'Accept: application/json' [MISP_URL]/[TARGET_ENDPOINT] | grep -i 'HTTP/1.1'