CVE-2025-66474: Xwiki rendering xml Remote Code Execution Vulnerability
HIGHCVE-2025-66474 is a HIGH remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Xwiki rendering xml libraries in the Maven ecosystem. The issue involves xwiki vulnerable to remote code execution through insufficient protection against {{/html}} injection. Remediation is available by upgrading affected packages to version 16.10.10, 17.4.3, 17.6.0-rc-1.
CVE-2025-66474 at a Glance
How to Fix CVE-2025-66474
To remediate this vulnerability, upgrade all affected Xwiki rendering xml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.xwiki.rendering</groupId>
<artifactId>xwiki-rendering-xml</artifactId>
<version>16.10.10</version>
</dependency>
<dependency>
<groupId>org.xwiki.rendering</groupId>
<artifactId>xwiki-rendering-xml</artifactId>
<version>17.4.3</version>
</dependency>
<dependency>
<groupId>org.xwiki.rendering</groupId>
<artifactId>xwiki-rendering-xml</artifactId>
<version>17.6.0-rc-1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.xwiki.rendering
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-66474, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.xwiki.rendering
Analyze the terminal output to locate any version of Xwiki rendering xml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 16.10.10), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.xwiki.rendering command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Xwiki rendering xml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66474 Affected Xwiki rendering xml Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.rendering:xwiki-rendering-xml
|
Maven |
< 16.10.10
|
16.10.10
|
|
org.xwiki.rendering:xwiki-rendering-xml
|
Maven |
≥ 17.0.0-rc-1
< 17.4.3
|
17.4.3
|
|
org.xwiki.rendering:xwiki-rendering-xml
|
Maven |
≥ 17.5.0-rc-1
< 17.6.0-rc-1
|
17.6.0-rc-1
|
References
Frequently Asked Questions
What is CVE-2025-66474?
Which Xwiki rendering xml versions are affected?
What version fixes CVE-2025-66474?
Is xwiki-rendering-xml affected?
What CWE is associated with CVE-2025-66474?
How can I check Maven dependencies for CVE-2025-66474?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9xc6-c2rm-f27p",
"modified" : "2025-12-11T15:48:01Z",
"published" : "2025-12-10T15:47:12Z",
"aliases" : [ "CVE-2025-66474" ],
"summary" : "XWiki vulnerable to remote code execution through insufficient protection against {{/html}} injection",
"details" : "### Impact\nAny 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.\n\n### Patches\nThis problem has been patched by extending the escaping introduced by [XRENDERING-693](https://jira.xwiki.org/browse/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](https://github.com/xwiki/xwiki-platform/commit/12b780ccd5bca5fc8f74f46648d7e02fa04fbc11) has been applied in `org.xwiki.platform:xwiki-platform-oldcore` as an extra safety net, see [XWIKI-23378](https://jira.xwiki.org/browse/XWIKI-23378). At this point, we're not aware that this extra safety net would be required for security.\n\nThe 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.\n\n### Workarounds\nWe're not aware of any workarounds except for upgrading the affected module to a version with a fix.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.rendering:xwiki-rendering-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "16.10.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.rendering:xwiki-rendering-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "17.0.0-rc-1"
}, {
"fixed" : "17.4.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.rendering:xwiki-rendering-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "17.5.0-rc-1"
}, {
"fixed" : "17.6.0-rc-1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-rendering/security/advisories/GHSA-9xc6-c2rm-f27p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66474"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/12b780ccd5bca5fc8f74f46648d7e02fa04fbc11"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-rendering/commit/9b71a2ee035815cfc29cebbfe81dbdd98f941d49"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-rendering"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XRENDERING-693"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XRENDERING-792"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XRENDERING-793"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-23378"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94", "CWE-95" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-10T15:47:12Z",
"nvd_published_at" : "2025-12-10T22:16:28Z"
}
}