{"id":"CVE-2022-24897","aliases":["CVE-2022-24897","GHSA-cvx5-m8vg-vxgc"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary filesystem write access from Velocity","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe 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. \n\n### Patches\nThe problem has been patched on versions 12.6.7, 12.10.3 and 13.0RC1.\n\n### Workarounds\nThere's no easy workaround for fixing this vulnerability other than upgrading and being careful when giving Script rights.\n\n### References\nhttps://jira.xwiki.org/browse/XWIKI-5168\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki](https://jira.xwiki.org)\n* Email us at [XWiki Security mailing-list](mailto:security@xwiki.org)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-04-28T21:16:40.000Z","modified":"2026-06-17T04:32:45.360Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:S/C:P/I:P/A:P","score":6,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-668"],"affected":[{"ranges":[{"version":">= 2.3, < 12.6.7","status":"affected"},{"version":"12.7-rc-1, < 12.10.3","status":"affected"}],"vendor":"xwiki","product":"xwiki-commons","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"12.6.7"}],"ecosystem":"Maven","package":"org.xwiki.commons:xwiki-commons-velocity","purl":"pkg:maven/org.xwiki.commons/xwiki-commons-velocity","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"12.7.0","status":"affected","fixed":"12.10.3"}],"ecosystem":"Maven","package":"org.xwiki.commons:xwiki-commons-velocity","purl":"pkg:maven/org.xwiki.commons/xwiki-commons-velocity","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.3","fixed":"12.6.7"},{"status":"affected","introduced":"12.7","fixed":"12.10.3"}],"vendor":"xwiki","product":"xwiki","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-cvx5-m8vg-vxgc","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-commons/pull/127","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XWIKI-5168","tags":["exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24897","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/xwiki/xwiki-commons","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-22T15:43:18.628Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24897","url":"https://www.cve.org/CVERecord?id=CVE-2022-24897","licence":"CVE Terms of Use","modified":"2025-04-22T18:02:07.004Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cvx5-m8vg-vxgc","url":"https://github.com/advisories/GHSA-cvx5-m8vg-vxgc","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:39.721Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24897","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24897","licence":"Public domain","modified":"2026-06-17T04:32:45.360Z"}],"updatedAt":"2026-11-25T22:58:11.350Z","epss":{"score":0.0179,"percentile":0.79008,"date":"2026-12-01T12:00:22.000Z"}}