RCE in XWiki Platform <=14.10.5 via icon theme injection
CVE-2023-36470 Published on June 29, 2023
Code injection in icon themes of XWiki Platform
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. By either creating a new or editing an existing document with an icon set, an attacker can inject XWiki syntax and Velocity code that is executed with programming rights and thus allows remote code execution. There are different attack vectors, the simplest is the Velocity code in the icon set's HTML or XWiki syntax definition. The [icon picker](https://extensions.xwiki.org/xwiki/bin/view/Extension/Icon%20Theme%20Application#HIconPicker) can be used to trigger the rendering of any icon set. The XWiki syntax variant of the icon set is also used without any escaping in some documents, allowing to inject XWiki syntax including script macros into a document that might have programming right, for this the currently used icon theme needs to be edited. Further, the HTML output of the icon set is output as JSON in the icon picker and this JSON is interpreted as XWiki syntax, allowing again the injection of script macros into a document with programming right and thus allowing remote code execution. This impacts the confidentiality, integrity and availability of the whole XWiki instance. This issue has been patched in XWiki 14.10.6 and 15.1. Icon themes now require script right and the code in the icon theme is executed within the context of the icon theme, preventing any rights escalation. A macro for displaying icons has been introduced to avoid injecting the raw wiki syntax of an icon set into another document. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Vulnerability Analysis
CVE-2023-36470 is exploitable with network access, and requires small amount of user privileges. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2023-36470. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Weakness Type
What is an Injection Vulnerability?
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. Software has certain assumptions about what constitutes data and control respectively. It is the lack of verification of these assumptions for user-controlled input that leads to injection problems. Injection problems encompass a wide variety of issues -- all mitigated in very different ways and usually attempted in order to alter the control flow of the process. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.
CVE-2023-36470 has been classified to as an Injection vulnerability or weakness.
Products Associated with CVE-2023-36470
Want to know whenever a new CVE is published for Xwiki? stack.watch will email you.
Affected Versions
xwiki-platform Version >= 6.2-milestone-1, < 14.10.6 is affected by CVE-2023-36470Vulnerable Packages
The following package name and versions may be associated with CVE-2023-36470
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| maven | org.xwiki.platform:xwiki-platform-icon-default | >= 6.2-milestone-1, < 14.10.6 | 14.10.6 |
| maven | org.xwiki.platform:xwiki-platform-icon-script | >= 6.2-milestone-1, < 14.10.6 | 14.10.6 |
| maven | org.xwiki.platform:xwiki-platform-icon-script | >= 15.0-rc-1, < 15.2-rc-1 | 15.2-rc-1 |
| maven | org.xwiki.platform:xwiki-platform-icon-default | >= 15.0-rc-1, < 15.2-rc-1 | 15.2-rc-1 |
| maven | org.xwiki.platform:xwiki-platform-icon-ui | >= 6.2-milestone-1, < 14.10.6 | 14.10.6 |
| maven | org.xwiki.platform:xwiki-platform-icon-ui | >= 15.0-rc-1, < 15.2-rc-1 | 15.2-rc-1 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.