CVE-2024-55877: XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList
Impact Any user with an account can perform arbitrary remote code execution by adding instances of XWiki.WikiMacroClass to any page. This compromises the confidentiality, integrity and availability of the whole XWiki installation. To reproduce on a instance, as a connected user without script nor programming rights, go to your user profile and add an object of type XWiki.WikiMacroClass.
Published Dec 12, 2024 · Updated Apr 30, 2025
Affected packages
org.xwiki.platform:xwiki-platform-help-ui
- Ecosystem
- Maven
- Affected
- >= 9.7-rc-1, < 15.10.11
- Fixed in
- 15.10.11
- Check
mvn dependency:tree -Dincludes=org.xwiki.platform:xwiki-platform-help-ui
org.xwiki.platform:xwiki-platform-help-ui
- Ecosystem
- Maven
- Affected
- >= 16.0.0-rc-1, < 16.4.1
- Fixed in
- 16.4.1
- Check
mvn dependency:tree -Dincludes=org.xwiki.platform:xwiki-platform-help-ui
org.xwiki.platform:xwiki-platform-help-ui
- Ecosystem
- Maven
- Affected
- >= 16.5.0-rc-1, < 16.5.0
- Fixed in
- 16.5.0
- Check
mvn dependency:tree -Dincludes=org.xwiki.platform:xwiki-platform-help-ui
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
Any user with an account can perform arbitrary remote code execution by adding instances of XWiki.WikiMacroClass to any page. This compromises the confidentiality, integrity and availability of the whole XWiki installation.
To reproduce on a instance, as a connected user without script nor programming rights, go to your user profile and add an object of type XWiki.WikiMacroClass. Set "Macro Id", "Macro Name" and "Macro Code" to any value, "Macro Visibility" to Current User and "Macro Description" to {{async}}{{groovy}}println("Hello from User macro!"){{/groovy}}{{/async}}. Save the page, then go to <host>/xwiki/bin/view/XWiki/XWikiSyntaxMacrosList. If the description of your new macro reads "Hello from User macro!", then your instance is vulnerable.
Patches
This vulnerability has been fixed in XWiki 15.10.11, 16.4.1 and 16.5.0.
Workarounds
It is possible to manually apply this patch to the page XWiki.XWikiSyntaxMacrosList.
References
- https://jira.xwiki.org/browse/XWIKI-22030
- https://github.com/xwiki/xwiki-platform/commit/40e1afe001d61eafdf13f3621b4b597a0e58a3e3
References
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-2r87-74cx-2p7c
- https://github.com/xwiki/xwiki-platform/commit/40e1afe001d61eafdf13f3621b4b597a0e58a3e3
- https://jira.xwiki.org/browse/XWIKI-22030
- https://nvd.nist.gov/vuln/detail/CVE-2024-55877
- https://github.com/advisories/GHSA-2r87-74cx-2p7c
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
