# CVE-2025-66474: XWiki vulnerable to remote code execution through insufficient protection against {{/html}} injection

> Attackers with edit permissions can inject HTML to execute arbitrary scripts, leading to remote code execution and full wiki access.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Dec 2025
- **Updated:** 11 Dec 2025
- **Also known as:** GHSA-9xc6-c2rm-f27p

## What is CVE-2025-66474?

CVE-2025-66474 is a high-severity code injection vulnerability in xwiki-rendering, published on 10 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

XWiki Rendering is a generic rendering system that converts textual input in a given syntax (wiki syntax, HTML, etc) into another syntax (XHTML, etc). Versions 16.10.9 and below, 17.0.0-rc-1 through 17.4.2 and 17.5.0-rc-1 through 17.5.0 have insufficient protection against {{/html}} injection, which attackers can exploit through RCE. Any user who can edit their own profile or any other document can execute arbitrary script macros, including Groovy and Python macros, which enable remote code execution as well as unrestricted read and write access to all wiki contents. This issue is fixed in versions 16.10.10, 17.4.3 and 17.6.0-rc-1.

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code)

## Which versions are affected by CVE-2025-66474?

6 open source packages ship an affected version, including org.xwiki.rendering:xwiki-rendering-xml. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | All versions | 16.10.10 |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | All versions | 16.10.10 |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | From 17.0.0-rc-1 | 17.4.3 |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | From 17.0.0-rc-1 | 17.4.3 |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | From 17.5.0-rc-1 | 17.6.0-rc-1 |
| `org.xwiki.rendering:xwiki-rendering-xml` | Maven | From 17.5.0-rc-1 | 17.6.0-rc-1 |

Products: Xwiki Xwiki-Rendering.

## How do I fix CVE-2025-66474?

Upgrade org.xwiki.rendering:xwiki-rendering-xml to a fixed version for your release line: 16.10.10, 17.4.3 or 17.6.0-rc-1.

## Is CVE-2025-66474 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66474 exists.

## Other vulnerabilities in xwiki-rendering

- [CVE-2023-37912](https://insights.sbomify.com/CVE-2023-37912/): XWiki Rendering's footnote macro vulnerable to privilege escalation via the footnote macro (critical 10.0)
- [CVE-2023-37908](https://insights.sbomify.com/CVE-2023-37908/): org.xwiki.rendering:xwiki-rendering-xml Improper Neutralization of Invalid Characters in Identifiers in Web Pages vulnerability (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-66474 and fix it if it is affected.

What it is: CVE-2025-66474 is a high-severity code injection vulnerability in xwiki-rendering, published on 10 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66474 exists.

Affected packages and fixed versions:
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected all versions; fixed in 16.10.10
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected all versions; fixed in 16.10.10
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected from 17.0.0-rc-1; fixed in 17.4.3
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected from 17.0.0-rc-1; fixed in 17.4.3
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected from 17.5.0-rc-1; fixed in 17.6.0-rc-1
- org.xwiki.rendering:xwiki-rendering-xml (Maven): affected from 17.5.0-rc-1; fixed in 17.6.0-rc-1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-66474/ (Markdown: https://insights.sbomify.com/CVE-2025-66474/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-66474
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-66474
- OSV: https://osv.dev/vulnerability/CVE-2025-66474

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-66474/
Summaries are generated and may contain mistakes; the official description above is the record.
