CVE-2023-48292
JSON

9.7critical

XWiki Admin Tools Application Run Shell Command allows CSRF RCE attacks

Severity
9.7critical CVSS:3.1 by GitHub_M
Exploit likelihood
33.9% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8jpr-ff92-hpf9

Description

The XWiki Admin Tools Application provides tools to help the administration of XWiki. Starting in version 4.4 and prior to version 4.5.1, a cross site request forgery vulnerability in the admin tool for executing shell commands on the server allows an attacker to execute arbitrary shell commands by tricking an admin into loading the URL with the shell command. A very simple possibility for an attack are comments. When the attacker can leave a comment on any page in the wiki it is sufficient to include an image with an URL like `/xwiki/bin/view/Admin/RunShellCommand?command=touch%20/tmp/attacked` in the comment. When an admin views the comment, the file `/tmp/attacked` will be created on the server. The output of the command is also vulnerable to XWiki syntax injection which offers a simple way to execute Groovy in the context of the XWiki installation and thus an even easier way to compromise the integrity and confidentiality of the whole XWiki installation. This has been patched by adding a form token check in version 4.5.1 of the admin tools. Some workarounds are available. The patch can be applied manually to the affected wiki pages. Alternatively, the document `Admin.RunShellCommand` can also be deleted if the possibility to run shell commands isn't needed.

Affected

Product or packageVersionsReported by
xwiki-contrib application-admintools>= 4.4, < 4.5.1CVE List
org.xwiki.contrib:xwiki-application-admintools (Maven)from 4.4 before 4.5.1GitHub Advisory Database
xwiki admin_toolsfrom 4.4 before 4.5.1NVD

All scores

GitHub_M9.7critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
GitHub9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

What each source says

CVE List

The XWiki Admin Tools Application provides tools to help the administration of XWiki. Starting in version 4.4 and prior to version 4.5.1, a cross site request forgery vulnerability in the admin tool for executing shell commands on the server allows an attacker to execute arbitrary shell commands by tricking an admin into loading the URL with the shell command. A very simple possibility for an attack are comments. When the attacker can leave a comment on any page in the wiki it is sufficient to include an image with an URL like `/xwiki/bin/view/Admin/RunShellCommand?command=touch%20/tmp/attacked` in the comment. When an admin views the comment, the file `/tmp/attacked` will be created on the server. The output of the command is also vulnerable to XWiki syntax injection which offers a simple way to execute Groovy in the context of the XWiki installation and thus an even easier way to compromise the integrity and confidentiality of the whole XWiki installation. This has been patched by adding a form token check in version 4.5.1 of the admin tools. Some workarounds are available. The patch can be applied manually to the affected wiki pages. Alternatively, the document `Admin.RunShellCommand` can also be deleted if the possibility to run shell commands isn't needed.

GitHub Advisory Database
Impact

A cross site request forgery vulnerability in the admin tool for executing shell commands on the server allows an attacker to execute arbitrary shell commands by tricking an admin into loading the URL with the shell command. A very simple possibility for an attack are comments. When the attacker can leave a comment on any page in the wiki it is sufficient to include an image with an URL like /xwiki/bin/view/Admin/RunShellCommand?command=touch%20/tmp/attacked in the comment. When an admin views the comment, the file /tmp/attacked will be created on the server. The output of the command is also vulnerable to XWiki syntax injection which offers a simple way to execute Groovy in the context of the XWiki installation and thus an even easier way to compromise the integrity and confidentiality of the whole XWiki installation.

Patches

This has been patched by adding a form token check in version 4.5.1 of the admin tools.

Workarounds

The patch can be applied manually to the affected wiki pages. Alternatively, the document Admin.RunShellCommand can also be deleted if the possibility to run shell commands isn't needed.

References
NVD (es)

XWiki Admin Tools Application proporciona herramientas para ayudar en la administración de XWiki. A partir de la versión 4.4 y antes de la versión 4.5.1, una vulnerabilidad de Cross-Site Request Forgery en la herramienta de administración para ejecutar comandos de shell en el servidor permite a un atacante ejecutar comandos de shell arbitrarios engañando a un administrador para que cargue la URL con el comando de shell. Una posibilidad muy simple de ataque son los comentarios. Cuando el atacante puede dejar un comentario en cualquier página de la wiki, basta con incluir una imagen con una URL como `/xwiki/bin/view/Admin/RunShellCommand?command=touch%20/tmp/attacked` en el comentario. Cuando un administrador vea el comentario, se creará el archivo `/tmp/attacked` en el servidor. La salida del comando también es vulnerable a la inyección de sintaxis de XWiki, lo que ofrece una manera sencilla de ejecutar Groovy en el contexto de la instalación de XWiki y, por lo tanto, una manera aún más fácil de comprometer la integridad y confidencialidad de toda la instalación de XWiki. Esto se solucionó agregando una verificación de token de formulario en la versión 4.5.1 de las herramientas de administración. Algunos workarounds están disponibles. El parche se puede aplicar manualmente a las páginas wiki afectadas. Alternativamente, el documento `Admin.RunShellCommand` también se puede eliminar si no se necesita la posibilidad de ejecutar comandos de shell.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-48292 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-8jpr-ff92-hpf9 changed 2023-11-20CC-BY-4.0
NVDCVE-2023-48292 changed 2026-06-17Public domain