CVE-2022-24897
JSON

7.5high

Arbitrary filesystem write access from Velocity

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.79% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cvx5-m8vg-vxgc

Description

APIs to evaluate content with Velocity is a package for APIs to evaluate content with Velocity. Starting with version 2.3 and prior to 12.6.7, 12.10.3, and 13.0, the velocity scripts are not properly sandboxed against using the Java File API to perform read or write operations on the filesystem. Writing an attacking script in Velocity requires the Script rights in XWiki so not all users can use it, and it also requires finding an XWiki API which returns a File. The problem has been patched in versions 12.6.7, 12.10.3, and 13.0. There is no easy workaround for fixing this vulnerability other than upgrading and being careful when giving Script rights.

Affected

Product or packageVersionsReported by
xwiki xwiki-commons>= 2.3, < 12.6.7, 12.7-rc-1, < 12.10.3CVE List
org.xwiki.commons:xwiki-commons-velocity (Maven)from 2.3.0 before 12.6.7, from 12.7.0 before 12.10.3GitHub Advisory Database
xwiki xwikifrom 2.3 before 12.6.7, from 12.7 before 12.10.3NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.0medium CVSS:2.0AV:N/AC:M/Au:S/C:P/I:P/A:P

Classification

CWE-22CWE-668

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

APIs to evaluate content with Velocity is a package for APIs to evaluate content with Velocity. Starting with version 2.3 and prior to 12.6.7, 12.10.3, and 13.0, the velocity scripts are not properly sandboxed against using the Java File API to perform read or write operations on the filesystem. Writing an attacking script in Velocity requires the Script rights in XWiki so not all users can use it, and it also requires finding an XWiki API which returns a File. The problem has been patched in versions 12.6.7, 12.10.3, and 13.0. There is no easy workaround for fixing this vulnerability other than upgrading and being careful when giving Script rights.

GitHub Advisory Database
Impact

The velocity scripts is not properly sandboxed against using the Java File API to perform read or write operations on the filesystem. Now writing an attacking script in velocity requires the Script rights in XWiki so not all users can use it, and it also requires finding an XWiki API which returns a File.

Patches

The problem has been patched on versions 12.6.7, 12.10.3 and 13.0RC1.

Workarounds

There's no easy workaround for fixing this vulnerability other than upgrading and being careful when giving Script rights.

References

https://jira.xwiki.org/browse/XWIKI-5168

For more information

If you have any questions or comments about this advisory:

NVD (es)

Las APIs para evaluar contenido con Velocity es un paquete para APIs para evaluar contenido con Velocity. A partir de la versión 2.3 y versiones anteriores a 12.6.7, 12.10.3 y 13.0, los scripts de Velocity no están correctamente protegidos contra el uso de la API de archivos de Java para llevar a cabo operaciones de lectura o escritura en el sistema de archivos. Escribir un script de ataque en Velocity requiere los derechos de Script en XWiki por lo que no todos los usuarios pueden usarlo, y también requiere encontrar una API de XWiki que devuelva un Archivo. El problema ha sido parcheado en versiones 12.6.7, 12.10.3 y 13.0. No se presenta una medida de mitigación fácil para corregir esta vulnerabilidad, aparte de actualizar y tener cuidado cuando son dados derechos de Script

References

Sources

SourceRecordLicence
CVE ListCVE-2022-24897 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-cvx5-m8vg-vxgc changed 2023-11-08CC-BY-4.0
NVDCVE-2022-24897 changed 2026-06-17Public domain