🇰🇷 한글 설명
Vega 시각화 라이브러리에서 발생하는 취약점으로, 특정 조건 하에 사용자 정의 JSON 정의를 통해 임의의 JavaScript 코드를 실행할 수 있습니다. 공격자가 악성 Vega 사양을 사용하여 DOM XSS 공격을 수행할 수 있으며, 이는 인증 토큰 탈취나 데이터 조작으로 이어질 수 있습니다.
💡 쉬운 설명
웹사이트에서 데이터 시각화를 보여줄 때, 공격자가 만든 특수한 설정 파일을 읽게 되면 해커가 사용자의 브라우저에서 몰래 명령을 실행할 수 있는 보안 약점입니다. 이를 통해 개인정보를 훔치거나 웹사이트를 마음대로 조작할 수 있습니다.
🇺🇸 원문 (English)
Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. Prior to versions 6.1.2 and 5.6.3, applications meeting two conditions are at risk of arbitrary JavaScript code execution, even if "safe mode" expressionInterpreter is used. First, they use `vega` in an application that attaches both `vega` library and a `vega.View` instance similar to the Vega Editor to the global `window`, or has any other satisfactory function gadgets in the global scope. Second, they allow user-defined Vega `JSON` definitions (vs JSON that was is only provided through source code). This vulnerability allows for DOM XSS, potentially stored, potentially reflected, depending on how the library is being used. The vulnerability requires user interaction with the page to trigger. An attacker can exploit this issue by tricking a user into opening a malicious Vega specification. Successful exploitation allows the attacker to execute arbitrary JavaScript in the context of the application’s domain. This can lead to theft of sensitive information such as authentication tokens, manipulation of data displayed to the user, or execution of unauthorized actions on behalf of the victim. This exploit compromises confidentiality and integrity of impacted applications.Patched versions are available in `
[email protected]` (requires ESM) for Vega v6 and `
[email protected]` (no ESM needed) for Vega v5. As a workaround, do not attach `vega` or `vega.View` instances to global variables or the window as the editor used to do. This is a development-only debugging practice that should not be used in any situation where Vega/Vega-lite definitions can come from untrusted parties.
📍 영향받는 시스템
Vega v6 (6.1.2 미만) 및 Vega v5 (5.6.3 미만) 라이브러리를 사용하며 vega/vega.View를 전역 window 객체에 노출한 애플리케이션
⚔️ 공격 벡터
사용자가 공격자가 제작한 악성 Vega JSON 사양을 포함한 페이지를 열도록 유도하여 실행
🛡️ 대응 방법
vega-selections 버전을 6.1.2(v6용) 또는 5.6.3(v5용) 이상으로 업데이트하고, vega 인스턴스를 전역 window 객체에 노출하지 않도록 수정
🔧 검증 코드
출력된 vega-selections의 버전이 6.1.2 또는 5.6.3 이상인지 확인