GHSA-p5f8-qf24-24cj
Velocity execution without script right through tree macro
Quick fix
GHSA-p5f8-qf24-24cj — org.xwiki.platform:xwiki-platform-index-tree-macro: upgrade to the fixed version with the command below.
# pom.xml: bump <version>14.10.7</version> for org.xwiki.platform:xwiki-platform-index-tree-macroDetails
### Impact
It's possible to execute a Velocity script without script right through the document tree.
To reproduce:
* As a user without script right, create a document, e.g., named Nasty Title * Set the document's title to `$request.requestURI` * Click "Save & View" * Reload the page in the browser
The navigation panel displays a document named with the current URL, showing that the Velocity code has been executed even though the user doesn't have script right.
### Patches
This has been patched in XWiki 14.10.7 and 15.2RC1.
### Workarounds
A possible workaround is to: * modify the page XWiki.DocumentTreeMacros * search for the code `#set ($discard = $translatedDocument.setTitle($translatedDocument.title))` * modify it into `#set ($discard = $translatedDocument.setcomment(''))`
### References
* https://jira.xwiki.org/browse/XWIKI-20625 * https://github.com/xwiki/xwiki-platform/commit/41d7dca2d30084966ca6a7ee537f39ee8354a7e3
### For more information
If you have any questions or comments about this advisory: * Open an issue in [Jira XWiki.org](https://jira.xwiki.org/) * Email us at [Security Mailing List](mailto:security@xwiki.org)
Are you affected?
Enter the version of the package you're using.
Affected packages
8.3-rc-1Fixed in: 14.10.7# pom.xml: bump <version>14.10.7</version> for org.xwiki.platform:xwiki-platform-index-tree-macro15.0-rc-1Fixed in: 15.2-rc-1# pom.xml: bump <version>15.2-rc-1</version> for org.xwiki.platform:xwiki-platform-index-tree-macroReferences
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-p5f8-qf24-24cj[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2023-50732[ADVISORY]
- https://github.com/xwiki/xwiki-platform/commit/41d7dca2d30084966ca6a7ee537f39ee8354a7e3[WEB]
- https://github.com/xwiki/xwiki-platform[PACKAGE]
- https://jira.xwiki.org/browse/XWIKI-20625[WEB]