{"id":"CVE-2022-24897","summary":"Arbitrary filesystem write access from Velocity","details":"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.","aliases":["GHSA-cvx5-m8vg-vxgc"],"modified":"2026-10-28T10:25:48.031873034Z","published":"2022-05-02T21:49:17Z","database_specific":{"cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24897.json","unresolved_ranges":[{"extracted_events":[{"range":[{"introduced":"12.7-rc-1, \u003c 12.10.3"},{"last_affected":"12.7-rc-1, \u003c 12.10.3"}],"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion"}]}],"cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://jira.xwiki.org/browse/XWIKI-5168"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24897.json"},{"type":"ADVISORY","url":"https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-cvx5-m8vg-vxgc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24897"},{"type":"FIX","url":"https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8"},{"type":"FIX","url":"https://github.com/xwiki/xwiki-commons/pull/127"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/xwiki/xwiki-commons","events":[{"introduced":"0"},{"fixed":"eb0223af7c2f08c62fbe1b381b12b465d6f4f39e"},{"introduced":"bf36e69ee28dd996e846d5ab9b131712b643bb4e"},{"fixed":"7ea75e4945d00f7321824e1442b8922da2f2fc4b"},{"fixed":"215951cfb0f808d0bf5b1097c9e7d1e503449ab8"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"2.3"},{"fixed":"12.6.7"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*"},{"cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","range":[{"introduced":"12.7"},{"fixed":"12.10.3"}],"source":"CPE_RANGE"},{"range":[{"fixed":"215951cfb0f808d0bf5b1097c9e7d1e503449ab8"}],"source":"REFERENCES_COMMIT"}]}},{"type":"GIT","repo":"https://github.com/xwiki/xwiki-platform","events":[{"introduced":"1bf0361e80e94dd763901e3a863b4caaa24b6e17"},{"fixed":"82cca0679aa3d0e04a0f64e74d30f4ba79e0d416"},{"introduced":"51217c93c66345dd99c93605060f30ec8d1c36ee"},{"fixed":"1c043970cac11a297f1c0744db90ba1421d582a5"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","range":[{"introduced":"2.3"},{"fixed":"12.6.7"}]},{"range":[{"introduced":"12.7"},{"fixed":"12.10.3"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*"}]}}],"versions":["xwiki-commons-12.10.2","xwiki-commons-12.10.1","xwiki-commons-12.6.6","xwiki-commons-12.10","xwiki-commons-12.6.5","xwiki-commons-12.6.4","xwiki-commons-12.6.3","xwiki-commons-12.6.2","xwiki-commons-12.6.1","xwiki-commons-12.6","xwiki-commons-8.3-milestone-2","xwiki-commons-8.3-milestone-1","xwiki-commons-8.2-milestone-2","xwiki-commons-8.2-milestone-1","xwiki-commons-8.1-milestone-2","xwiki-commons-8.1-milestone-1","xwiki-commons-8.0-milestone-2","xwiki-commons-8.0-milestone-1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24897.json","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8","target":{"file":"xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java","function":"SecureIntrospector"},"deprecated":false,"digest":{"function_hash":"81047757659018862351086404442862922365","length":1398},"id":"CVE-2022-24897-4c37a146","signature_type":"Function"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8","target":{"file":"xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["202394429013584469158929458879958634353","181148629691150244035287895161789671538","224178537737055095463356229114566892523","337538851078687409294225754395710517681","249144457320600783359085821244945853082","242612171403726548546824953538574664630","68146638085292745189437561555096364689","116040269509476801474778274482731424614","31774409285169054903789992675175177601","96714594055467343777462830770547337318","133350704650583275964021978934345587649","241339319350465438365381171999863077653","159578003708463785192015073673995364950","214184409866757609294555981322371736907","193344973784968206287686942585649445098","74394074304681410059942995147613868519","167195114767789636567541524995634296850","92254153025524336311394787276550807832","83945657811172430405146359899577193113","253179382255359584764532178534765223339","254896546999533729734267532882527511394","125075636430362056009103032305167272298","334751400252548827609335358528127802563","101791069282214869639722160811292500697","108526341238523054577048305158658491589","66123881420453359894661734138061945396","124148333752830145946248207779194551977","215306742493624284920644758944805102333","269655171716462989669659703648430572948","329290905499266757080164546841691967860","78307552667088413888639196004978822416","44318239446369339244604623232684152979","264069095915209038807507043285231561913","41252578697756345207110241338847130885","312471430061378302118540457700183030896","335065649087304534818440826426849174018","315430065841200070154246929533232076302","239411350000153063525743577097059792553","337631567085904590639950589807604892065","3911290578341732463806332700867732455"]},"id":"CVE-2022-24897-7e00fae7"},{"digest":{"function_hash":"117454811291613861019966194123129666404","length":228},"id":"CVE-2022-24897-d26aacf4","signature_type":"Function","signature_version":"v1","source":"https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8","target":{"function":"checkObjectExecutePermission","file":"xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java"},"deprecated":false}],"vanir_signatures_modified":"2026-10-28T10:25:48Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}