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 package | Versions | Reported by |
|---|---|---|
| xwiki-contrib application-admintools | >= 4.4, < 4.5.1 | CVE List |
| org.xwiki.contrib:xwiki-application-admintools (Maven) | from 4.4 before 4.5.1 | GitHub Advisory Database |
| xwiki admin_tools | from 4.4 before 4.5.1 | NVD |
All scores
| GitHub_M | 9.7critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS: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
| https://github.com/xwiki-contrib/application-admintools/security/advisories/GHSA-8jpr-ff92-hpf9 | patch, vendor-advisory, web | |
| https://github.com/xwiki-contrib/application-admintools/commit/03815c505c9f37006a0c56495e862dc549a39da8 | patch, web | |
| https://jira.xwiki.org/browse/ADMINTOOL-91 | issue-tracking, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-48292 | advisory | |
| https://github.com/xwiki-contrib/application-admintools | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-48292 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8jpr-ff92-hpf9 changed 2023-11-20 | CC-BY-4.0 |
| NVD | CVE-2023-48292 changed 2026-06-17 | Public domain |