🇰🇷 한글 설명
YesWiki 4.6.6 미만 버전에서 발생하는 저장형 SQL 인젝션 취약점입니다. 최근 변경 사항(recentchanges) 액션의 매개변수 검증 미흡으로 인해 공격자가 악성 SQL 쿼리를 삽입할 수 있으며, 이를 통해 데이터베이스의 임의 데이터를 탈취할 수 있습니다.
💡 쉬운 설명
웹사이트의 특정 페이지에 몰래 악성 명령어를 심어두어, 누군가 그 페이지를 볼 때마다 데이터베이스의 중요한 정보가 유출되는 보안 결함입니다. 공격자는 이를 통해 사용자 정보나 비밀번호 같은 민감한 데이터를 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
YesWiki is a wiki system written in PHP. Prior to version 4.6.6, the recentchanges action (actions/recentchanges.php) accepts a period argument from two disjoint parameter spaces. A whitelist validates only the URL form against ['day','week','month']. The action-argument form takes the else branch with no validation, and the value flows into PageManager::getRecentlyChanged(), where it is interpolated into a WHERE time >= '...' ORDER BY time DESC clause without escaping or parameterization. UNION-based injection succeeds, the leaked rows render into the response page, so any visitor of the trigger page sees the exfiltrated data. The vulnerability provides arbitrary read of the YesWiki database to anyone who can save the trigger page. On a default install (default_write_acl='*'), this includes anonymous users, subject to the hashcash JS check on the page-edit form. Once the trigger page is saved, every subsequent view fires the injection as the SQLi is stored. Stored SQL injection is reachable through the page-edit flow, with arbitrary database read. This issue has been patched in version 4.6.6.
📍 영향받는 시스템
YesWiki 4.6.6 미만 모든 버전
⚔️ 공격 벡터
page-edit 흐름을 통한 저장형 SQL 인젝션 (Stored SQL Injection)
🛡️ 대응 방법
YesWiki를 최신 보안 패치가 적용된 4.6.6 버전 이상으로 업데이트하십시오.
🔧 검증 코드
설치된 YesWiki의 버전을 확인하여 4.6.6 미만인 경우 취약한 상태로 판단합니다.
php -r "echo 'YesWiki version check logic';" | grep -E '4.6.6'