CVE-2022-24897 is a high-severity (CVSS 7.5) Path Traversal vulnerability in org.xwiki.commons:xwiki-commons-velocity. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for org.xwiki.commons:xwiki-commons-velocity — see the affected versions and patch details below.
Arbitrary filesystem write access from Velocity
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-24897.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.xwiki.commons:xwiki-commons-velocity☕org.xwiki.commons:xwiki-commons-velocityReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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:
- Open an issue in Jira XWiki
- Email us at XWiki Security mailing-list
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.xwiki.commons:xwiki-commons-velocity | ≥ 2.3.0&&< 12.6.7 | 12.6.7org.xwiki.commons:xwiki-commons-velocity:12.6.7 |
| ☕Maven | org.xwiki.commons:xwiki-commons-velocity | ≥ 12.7.0&&< 12.10.3 | 12.10.3org.xwiki.commons:xwiki-commons-velocity:12.10.3 |
Affected Products
xwikixwikiResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.xwiki.commons:xwiki-commons-velocity, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.xwiki.commons:xwiki-commons-velocity to 12.6.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-24897 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2022-24897 in your dependencies?
Find it across Maven, including transitive dependencies.