CVE-2025-53837
org.xwiki.rendering:xwiki-rendering-xml has an Eval Injection issue
Description
Impact
Any user who can edit their own user profile or any other document can execute arbitrary script macros including Groovy and Python macros that allow remote code execution including unrestricted read and write access to all wiki contents. The reason is that rendering output is included as content of HTML macros without further escaping and it is thus possible to close the HTML macro and inject script macros that are executed with programming rights.
This can be demonstrated by adding an object of type XWiki.UIExtensionClass to a document with content {{html wiki="true"}}~{~{~/~h~t~m~l~}~}~ ~{~{~c~a~c~h~e~}~}~{~{~g~r~o~o~v~y~}~}~p~r~i~n~t~l~n~(~1~)~{~{~/~g~r~o~o~v~y~}~}~{~{~/~c~a~c~h~e~}~}{{/html}}, extension point id org.xwiki.platform.html.head, extension id org.xwiki.myuser.test and extension scope "current user". When opening <xwiki-server>/xwiki/bin/view/Main/?sheet=CKEditor.ContentSheet&xpage=plain where <xwiki-server> is the URL of the XWiki installation, the output should start with {{/html}} {{cache}}{{groovy}}println(1){{/groovy}}{{/cache}} and not with 1</p>.
This escaping was always missing at least in XWiki syntax version 2, it is definitely exploitable in XWiki 3.3 Milestone 1 via the user profile (not through extension points), though this has also been fixed by a separate patch, see the advisory. Exploitable extension points include org.xwiki.platform.search.ui.docdoesnotexist which has been added in XWiki 8.3 Milestone 1.
Patches
This has been patched in XWiki 14.10.2 and 15.0 RC1 by making sure that rendering output cannot close the surrounding HTML macro.
Workarounds
It is in principle possible to add escaping to all places where rendering output is used in wiki documents but at the moment there is no list of them.
For more information
If you have any questions or comments about this advisory:
- Open an issue in Jira XWiki.org
- Email us at Security Mailing List
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.xwiki.rendering » xwiki-rendering-xml | < 14.10.2 | 14.10.2 |
Blast radius
59% of the dependent artifacts (583) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,092 |
| 2 hops | 4,692 |
| 3 hops | 17,022 |
| 4 hops | 40,865 |
| 5 hops | 17,183 |
| 6 hops | 2,134 |
Most used dependents
- org.xwiki.platform » xwiki-platform-oldcore449 usages
- org.xwiki.rendering » xwiki-rendering-macro-html145 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.rendering » xwiki-rendering-syntax-xwiki2177 usages
- org.xwiki.platform » xwiki-platform-administration-ui75 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
- org.xwiki.platform » xwiki-platform-configuration-default57 usages
- org.phenotips » patient-data-api52 usages
- com.xwiki.licensing » application-licensing-licensor-api51 usages
- org.xwiki.platform » xwiki-platform-skin-skinx49 usages
Computed from the dependency graph of build 20261124.0621 (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
| Package | xwiki/xwiki-rendering | github.com |
| Web | xwiki/xwiki-rendering advisory GHSA-26vp-8gxg-v4pg | github.com |
| Web | xwiki/xwiki-rendering commit 92bc809 | github.com |
| Web | xwiki/xwiki-rendering release xwiki-rendering-14.10.2 | github.com |
| Web | xwiki/xwiki-rendering release xwiki-rendering-15.0-rc-1 | github.com |
| Web | browse/XRENDERING-693 | jira.xwiki.org |
| Web | browse/XWIKI-20313 | jira.xwiki.org |
| Web | browse/XWIKI-20327 | jira.xwiki.org |
