CVE-2022-41931 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in xwiki-platform-icon-ui

Critical 9.9 Published Updated

Attackers with view rights can execute arbitrary code via the icon picker macro in XWiki, requiring an upgrade to patched versions.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-41931?

CVE-2022-41931 is a critical code injection vulnerability in Xwiki Xwiki, published on 23 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

xwiki-platform-icon-ui is vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'). Any user with view rights on commonly accessible documents including the icon picker macro can execute arbitrary Groovy, Python or Velocity code in XWiki due to improper neutralization of the macro parameters of the icon picker macro. The problem has been patched in XWiki 13.10.7, 14.5 and 14.4.2. Workarounds: The [patch](https://github.com/xwiki/xwiki-platform/commit/47eb8a5fba550f477944eb6da8ca91b87eaf1d01) can be manually applied by editing `IconThemesCode.IconPickerMacro` in the object editor. The whole document can also be replaced by the current version by importing the document from the XAR archive of a fixed version as the only changes to the document have been security fixes and small formatting changes.

Weakness: CWE-95

Which versions are affected by CVE-2022-41931?

4 open source packages ship an affected version, including org.xwiki.platform:xwiki-platform-icon-ui. It affects 1 product.

PackageAffectedFixed in
org.xwiki.platform:xwiki-platform-icon-ui MavenFrom 14.0.014.4.2
org.xwiki.platform:xwiki-platform-icon-ui MavenFrom 14.0.014.4.2
org.xwiki.platform:xwiki-platform-icon-ui MavenFrom 6.4-milestone-213.10.7
org.xwiki.platform:xwiki-platform-icon-ui MavenFrom 6.4-milestone-213.10.7

Products include Xwiki Xwiki.

How do I fix CVE-2022-41931?

Upgrade org.xwiki.platform:xwiki-platform-icon-ui to a fixed version for your release line: 14.4.2 or 13.10.7.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2022-41931 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41931 exists.

All Xwiki Xwiki vulnerabilities

Sources

Also known as GHSA-5j7g-cf6r-g2h7.

Is CVE-2022-41931 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free