🇰🇷 한글 설명
Wiki.js 2.5.191 미만 버전에서 코드 블록 내의 mustache 표현식이 Vue에 의해 파싱되어 발생하는 저장형 교차 사이트 스크립팅(XSS) 취약점입니다. 공격자가 악의적인 위키 페이지를 생성하면, 해당 페이지를 열람하는 다른 사용자의 브라우저에서 악성 자바스크립트가 실행될 수 있습니다.
💡 쉬운 설명
위키 페이지의 코드 입력창에 특수 코드를 숨겨두면, 다른 사람이 그 페이지를 볼 때 해커가 의도한 동작이 몰래 실행될 수 있는 문제입니다. 이를 통해 사용자의 정보를 훔치거나 계정을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
Wiki.js an open-source wiki app built on Node.js. Wiki.js before version 2.5.191 is vulnerable to stored cross-site scripting through mustache expressions in code blocks. This vulnerability exists due to mustache expressions being parsed by Vue during content injection even though it is contained within a `<pre>` element. By creating a crafted wiki page, a malicious Wiki.js user may stage a stored cross-site scripting attack. This allows the attacker to execute malicious JavaScript when the page is viewed by other users. For an example see referenced GitHub Security Advisory. Commit 5ffa189383dd716f12b56b8cae2ba0d075996cf1 fixes this vulnerability by adding the v-pre directive to all `<pre>` tags during the render.
📍 영향받는 시스템
Wiki.js version 2.5.191 미만
⚔️ 공격 벡터
악의적으로 조작된 mustache 표현식이 포함된 위키 페이지를 작성하여 저장한 후 타 사용자가 이를 열람하게 함
🛡️ 대응 방법
Wiki.js를 최신 버전(2.5.191 이상)으로 업데이트하여 <pre> 태그에 v-pre 지시어가 적용되도록 조치
🔧 검증 코드
출력된 버전 정보가 2.5.191 미만인지 확인하여 취약 여부를 판단합니다.
npm list wikijs || curl -s https://api.github.com/repos/Requarks/wiki/releases | grep -E 'tag_name'