CVE-2025-66474
XWiki vulnerable to remote code execution through insufficient protection against {{/html}} injection
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 with insufficient escaping, and it is thus possible to close the HTML macro and inject script macros that are executed with programming rights. To demonstrate, the content {{html}}{{/html {{/html}}}} can be inserted into any field of the user profile that supports wiki syntax like the "About" field. If this leads to the display of raw HTML, the instance is vulnerable.
Patches
This problem has been patched by extending the escaping introduced by XRENDERING-693 to also cover closing HTML macros that have spaces after the macro name in XWiki 16.10.10, 17.4.3 and 17.6.0RC1. A similar fix has been applied in org.xwiki.platform:xwiki-platform-oldcore as an extra safety net, see XWIKI-23378. At this point, we're not aware that this extra safety net would be required for security.
The patch also fixes the injection of opening HTML macro syntaxes, e.g., with {{html}}{{html{{/html}}}} which disrupts the rendering of the user profile but for which we haven't found any further security impact apart from the disruption of the UI.
Workarounds
We're not aware of any workarounds except for upgrading the affected module to a version with a fix.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.xwiki.rendering » xwiki-rendering-xml | < 16.10.10>= 17.0.0-rc-1, < 17.4.3>= 17.5.0-rc-1, < 17.6.0-rc-1 | 16.10.10, 17.4.3, 17.6.0-rc-1 |
Blast radius
71% of the dependent artifacts (780) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,595 |
| 2 hops | 6,164 |
| 3 hops | 23,591 |
| 4 hops | 57,328 |
| 5 hops | 26,459 |
| 6 hops | 4,839 |
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 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.
References
| Advisory | NVD CVE-2025-66474 | nvd.nist.gov |
| Package | xwiki/xwiki-rendering | github.com |
| Web | xwiki/xwiki-rendering advisory GHSA-9xc6-c2rm-f27p | github.com |
| Web | xwiki/xwiki-platform commit 12b780c | github.com |
| Web | xwiki/xwiki-rendering commit 9b71a2e | github.com |
| Web | browse/XRENDERING-693 | jira.xwiki.org |
| Web | browse/XRENDERING-792 | jira.xwiki.org |
| Web | browse/XRENDERING-793 | jira.xwiki.org |
| Web | browse/XWIKI-23378 | jira.xwiki.org |
