CVE-2025-49581
Published: 13 June 2025
Summary
CVE-2025-49581 is a high-severity Code Injection (CWE-94) vulnerability in Xwiki Xwiki. Its CVSS base score is 8.7 (High).
Operationally, ranked in the top 11.5% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis
XWiki, a generic wiki platform, contains an improper code generation flaw (CWE-94) that permits privilege escalation. Any user granted edit rights on a page can register a wiki macro whose parameters accept wiki syntax; when the macro's default value is later rendered inside a document authored with programming rights, such as XWiki.ChildrenMacro, the embedded script (Groovy, Python or Velocity) executes with those elevated privileges, granting full control over the XWiki installation.
An attacker needs only edit access to any page. By overriding a commonly included macro and supplying a default parameter that contains arbitrary script, the attacker obtains programming rights without requiring administrative intervention, enabling complete read, write and execution access across the instance.
The vulnerability is addressed in the official patches released for XWiki 16.4.7, 16.10.3 and 17.0.0. The fix ensures that default values supplied for wiki-syntax parameters are executed using the rights of the macro's own author rather than the rights of the including document, as described in the GitHub security advisory GHSA-9875-cw22-f7cx and the corresponding commit.
EPSS remains flat at 0.0387 with no material increase since disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-18284
Vulnerability details
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…
more
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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Policy promotes least privilege by defining necessary privileges and management commitment to them.
Supervision detects and allows removal of unnecessary privileges that enable execution with excess rights.
Reviewing accounts for compliance, disabling/removing unneeded accounts, and aligning with termination processes prevents execution with unnecessary privileges.
Separation of duties prevents any single user from holding all privileges needed to complete a critical task, directly reducing execution with unnecessary privileges.
Directly prevents execution with more privileges than needed for assigned tasks.
Role-based training on least privilege principles reduces the chance personnel assign or retain unnecessary privileges.
Analysis of audit records can identify execution with unnecessary privileges through unusual activity patterns.
Automatic termination after a defined period eliminates unnecessary privileges from persistent connections.