CVE-2025-66474: Xwiki rendering xml Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-9xc6-c2rm-f27p
CWE-94 CWE-95
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-66474
GHSA Identifier GHSA-9xc6-c2rm-f27p
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Xwiki rendering xml
Package Ecosystem Maven
Published Date
Last Updated

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.

org.xwiki.rendering:xwiki-rendering-xml fixed: 16.10.10
<dependency>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-xml</artifactId>
    <version>16.10.10</version>
</dependency>
org.xwiki.rendering:xwiki-rendering-xml fixed: 17.4.3
<dependency>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-xml</artifactId>
    <version>17.4.3</version>
</dependency>
org.xwiki.rendering:xwiki-rendering-xml fixed: 17.6.0-rc-1
<dependency>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-xml</artifactId>
    <version>17.6.0-rc-1</version>
</dependency>
Verify Direct and Transitive Dependencies

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

### 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](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. 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.

CVE-2025-66474 Affected Xwiki rendering xml Versions

3 component(s)
Fixed Versions:
16.10.1017.4.317.6.0-rc-1
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?
CVE-2025-66474 is a security vulnerability in Xwiki rendering xml involving XWiki vulnerable to remote code execution through insufficient protection against {{/html}} injection under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Xwiki rendering xml versions are affected?
Affected versions include releases prior to 16.10.10, 17.4.3, 17.6.0-rc-1 across affected packages: org.xwiki.rendering:xwiki-rendering-xml.
What version fixes CVE-2025-66474?
Upgrading to 16.10.10, 17.4.3, 17.6.0-rc-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-rendering-xml affected?
Yes, org.xwiki.rendering:xwiki-rendering-xml is affected in releases prior to 16.10.10, 17.4.3, 17.6.0-rc-1. Upgrade your dependency to 16.10.10, 17.4.3, 17.6.0-rc-1 or later.
What CWE is associated with CVE-2025-66474?
CVE-2025-66474 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (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.).
How can I check Maven dependencies for CVE-2025-66474?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.rendering'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}