🇰🇷 한글 설명
Trix 에디터 2.1.18 미만 버전에서 발생하는 교차 사이트 스크립팅(XSS) 취약점입니다. Level0InputController를 사용하는 환경에서 조작된 JSON 페이로드를 드래그 앤 드롭할 경우, StringPiece.fromJSON 메서드가 href 속성을 검증 없이 신뢰하여 자바스크립트 코드가 실행될 수 있습니다.
💡 쉬운 설명
글쓰기 도구인 Trix에서 악의적으로 만들어진 내용을 마우스로 끌어다 놓으면 해커의 코드가 실행될 수 있는 보안 약점입니다. 사용자가 의도치 않게 특정 내용을 복사해서 붙여넣을 때 발생할 수 있습니다.
🇺🇸 원문 (English)
Trix is a what-you-see-is-what-you-get rich text editor for everyday writing. Prior to 2.1.18, Trix is vulnerable to cross-site scripting when a crafted application/x-trix-document JSON payload is dropped into an editor using the fallback Level0InputController, such as an embedded WebView without Input Events Level 2 support. The StringPiece.fromJSON method trusts href attributes from the JSON payload without sanitization, allowing a draggable element containing a javascript: URI to bypass DOMPurify sanitization and inject executable JavaScript into the DOM. Exploitation requires the victim to drag and drop attacker-controlled content, and server-side HTML sanitization can neutralize the payload on save. This issue is fixed in version 2.1.18.
📍 영향받는 시스템
Trix rich text editor version < 2.1.18
⚔️ 공격 벡터
공격자가 조작한 application/x-trix-document JSON 페이로드를 사용자가 에디터로 드래그 앤 드롭함
🛡️ 대응 방법
Trix 에디터를 최신 버전인 2.1.18 이상으로 업데이트하거나 서버 측 HTML 살균(Sanitization)을 강화합니다.
🔧 검증 코드
출력된 버전이 2.1.18 미만인 경우 해당 취약점에 노출된 상태입니다.
npm list trix | grep -E 'trix@([0-1]\.|2\.[0-1]\.[0-9]{0,17})'
💻 영향받는 소프트웨어
IBM WebSphere Application Server