CVE-2025-53836: XWiki Rendering is vulnerable to RCE attacks when processing nested macros
(updated )
The default macro content parser didn’t preserve the restricted attribute of the transformation context when executing nested macros. This allows executing macros that are normally forbidden in restricted mode, in particular script macros. The cache and chart macros that are bundled in XWiki use the vulnerable feature. The following XWiki syntax, when used inside a comment in XWiki, demonstrates the privilege escalation from comment right to programming right and thus remote code execution (RCE) that is possible due to this:
{{cache}}{{groovy}}println("Hello from Groovy!"){{/groovy}}{{/cache}}
This vulnerability exists since the restricted attribute has been added to the transformation context in version 4.2.
References
- github.com/advisories/GHSA-32mf-57h2-64x9
- github.com/xwiki/xwiki-rendering
- github.com/xwiki/xwiki-rendering/commit/c73fa3ccd4ac59057e48e5d4325f659e78e8f86d
- github.com/xwiki/xwiki-rendering/security/advisories/GHSA-32mf-57h2-64x9
- jira.xwiki.org/browse/XRENDERING-689
- jira.xwiki.org/browse/XWIKI-20375
- nvd.nist.gov/vuln/detail/CVE-2025-53836
Code Behaviors & Features
Detect and mitigate CVE-2025-53836 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →