CVE-2022-41931 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in xwiki-platform-icon-ui
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.
| Package | Affected | Fixed in |
|---|---|---|
org.xwiki.platform:xwiki-platform-icon-ui Maven | From 14.0.0 | 14.4.2 |
org.xwiki.platform:xwiki-platform-icon-ui Maven | From 14.0.0 | 14.4.2 |
org.xwiki.platform:xwiki-platform-icon-ui Maven | From 6.4-milestone-2 | 13.10.7 |
org.xwiki.platform:xwiki-platform-icon-ui Maven | From 6.4-milestone-2 | 13.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.
Other vulnerabilities in Xwiki Xwiki
- CVE-2025-24893 XWiki Platform Eval Injection
- CVE-2025-53836 XWiki Rendering is vulnerable to RCE attacks when processing nested macros
- CVE-2024-55662 XWiki allows remote code execution through the extension sheet
- CVE-2024-55877 XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList
- CVE-2024-37901 XWiki Platform vulnerable to remote code execution from account via SearchSuggestConfigSheet
Sources
Also known as GHSA-5j7g-cf6r-g2h7.