HIGH 7.5

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:

Affected Maven artifacts (1)

ArtifactAffected versionsFixed 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

1affected artifacts
337affected versions
930dependent artifacts (est.)
64,969dependent versions

56% of the dependent artifacts (524) still pull an affected version in their latest release.

DepthDependent 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

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.