CVE-2022-24897
Arbitrary filesystem write access from velocity.
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 Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.xwiki.commons » xwiki-commons-velocity | >= 2.3.0, < 12.6.7>= 12.7.0, < 12.10.3 | 12.6.7, 12.10.3 |
Blast radius
56% of the dependent artifacts (524) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 3,066 |
| 2 hops | 15,453 |
| 3 hops | 32,794 |
| 4 hops | 11,950 |
| 5 hops | 1,625 |
| 6 hops | 81 |
Most used dependents
- org.xwiki.platform » xwiki-platform-oldcore449 usages
- org.xwiki.platform » xwiki-platform-rendering-macro-velocity175 usages
- org.xwiki.platform » xwiki-platform-test-docker101 usages
- org.xwiki.rendering » xwiki-rendering-test94 usages
- org.xwiki.platform » xwiki-platform-rest-server85 usages
- org.xwiki.platform » xwiki-platform-tool-packager-plugin77 usages
- org.xwiki.platform » xwiki-platform-administration-ui75 usages
- org.xwiki.platform » xwiki-platform-rendering-macro-include74 usages
- org.xwiki.platform » xwiki-platform-test-page72 usages
- org.xwiki.platform » xwiki-platform-test-oldcore71 usages
- org.xwiki.platform » xwiki-platform-panels-ui62 usages
- com.xpn.xwiki.platform » xwiki-core61 usages
- org.xwiki.platform » xwiki-platform-configuration-default57 usages
- org.phenotips » patient-data-api52 usages
- com.xwiki.licensing » application-licensing-licensor-api51 usages
Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2022-24897 | nvd.nist.gov |
| Package | xwiki/xwiki-commons | github.com |
| Web | xwiki/xwiki-commons advisory GHSA-cvx5-m8vg-vxgc | github.com |
| Web | xwiki/xwiki-commons pull request #127 | github.com |
| Web | xwiki/xwiki-commons commit 215951c | github.com |
| Web | browse/XWIKI-5168 | jira.xwiki.org |
