ghsa-32mf-57h2-64x9
Vulnerability from github
Impact
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.
Patches
This has been patched in XWiki 13.10.11, 14.4.7 and 14.10.
Workarounds
To avoid the exploitation of this bug, comments can be disabled for untrusted users until an upgrade to a patched version has been performed. Note that users with edit rights will still be able to add comments via the object editor even if comments have been disabled.
Resources
- https://github.com/xwiki/xwiki-rendering/commit/c73fa3ccd4ac59057e48e5d4325f659e78e8f86d
- https://jira.xwiki.org/browse/XRENDERING-689
- https://jira.xwiki.org/browse/XWIKI-20375
For more information
If you have any questions or comments about this advisory: * Open an issue in Jira XWiki.org * Email us at Security Mailing List
Attribution
This vulnerability has been reported on Intigriti by René de Sain @renniepak.
{ "affected": [ { "package": { "ecosystem": "Maven", "name": "org.xwiki.rendering:xwiki-rendering-transformation-macro" }, "ranges": [ { "events": [ { "introduced": "4.2-milestone-1" }, { "fixed": "13.10.11" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.rendering:xwiki-rendering-transformation-macro" }, "ranges": [ { "events": [ { "introduced": "14.0" }, { "fixed": "14.4.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.rendering:xwiki-rendering-transformation-macro" }, "ranges": [ { "events": [ { "introduced": "14.5" }, { "fixed": "14.10" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-53836" ], "database_specific": { "cwe_ids": [ "CWE-863", "CWE-94" ], "github_reviewed": true, "github_reviewed_at": "2025-07-14T22:03:06Z", "nvd_published_at": "2025-07-15T00:15:22Z", "severity": "CRITICAL" }, "details": "### Impact\n\nThe default macro content parser didn\u0027t 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](https://extensions.xwiki.org/xwiki/bin/view/Extension/Cache%20Macro) and [chart](https://extensions.xwiki.org/xwiki/bin/view/Extension/Chart%20Macro) 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:\n\n```\n{{cache}}{{groovy}}println(\"Hello from Groovy!\"){{/groovy}}{{/cache}}\n```\n\nThis vulnerability exists since the restricted attribute has been added to the transformation context in version 4.2.\n\n### Patches\nThis has been patched in XWiki 13.10.11, 14.4.7 and 14.10.\n\n### Workarounds\nTo avoid the exploitation of this bug, comments can be disabled for untrusted users until an upgrade to a patched version has been performed. Note that users with edit rights will still be able to add comments via the object editor even if comments have been disabled.\n\n### Resources\n* https://github.com/xwiki/xwiki-rendering/commit/c73fa3ccd4ac59057e48e5d4325f659e78e8f86d\n* https://jira.xwiki.org/browse/XRENDERING-689\n* https://jira.xwiki.org/browse/XWIKI-20375\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)\n\n### Attribution\n\nThis vulnerability has been reported on Intigriti by Ren\u00e9 de Sain @renniepak.", "id": "GHSA-32mf-57h2-64x9", "modified": "2025-07-15T00:35:24Z", "published": "2025-07-14T22:03:06Z", "references": [ { "type": "WEB", "url": "https://github.com/xwiki/xwiki-rendering/security/advisories/GHSA-32mf-57h2-64x9" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-53836" }, { "type": "WEB", "url": "https://github.com/xwiki/xwiki-rendering/commit/c73fa3ccd4ac59057e48e5d4325f659e78e8f86d" }, { "type": "PACKAGE", "url": "https://github.com/xwiki/xwiki-rendering" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XRENDERING-689" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XWIKI-20375" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "type": "CVSS_V3" } ], "summary": "XWiki Rendering is vulnerable to RCE attacks when processing nested macros" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.