Headline
GHSA-pwfv-3cvg-9m4c: org.xwiki.platform:xwiki-platform-oldcore makes Incorrect Use of Privileged APIs with DocumentAuthors
Impact
The Document script API returns directly a DocumentAuthors allowing to set any authors to the document, which in consequence can allow subsequent executions of scripts since this author is used for checking rights. Example of such attack:
{{velocity}}
$doc.setContent('{{velocity}}$xcontext.context.authorReference{{/velocity}}')
$doc.authors.setContentAuthor('xwiki:XWiki.superadmin')
$doc.getRenderedContent()
{{/velocity}}
Patches
The problem has been patched in XWiki 14.10 and 14.4.7 by returning a safe script API.
Workarounds
There no easy workaround apart of upgrading.
References
- https://jira.xwiki.org/browse/XWIKI-20380
- https://github.com/xwiki/xwiki-platform/commit/905cdd7c421dbf8c565557cdc773ab1aa9028f83
For more information
If you have any questions or comments about this advisory:
- Open an issue in Jira
- Email us at security ML
- GitHub Advisory Database
- GitHub Reviewed
- CVE-2023-29507
org.xwiki.platform:xwiki-platform-oldcore makes Incorrect Use of Privileged APIs with DocumentAuthors
Critical severity GitHub Reviewed Published Apr 12, 2023 in xwiki/xwiki-platform • Updated Apr 12, 2023
Package
maven org.xwiki.platform:xwiki-platform-oldcore (Maven)
Affected versions
>= 14.5, < 14.10
>= 14.4.1, < 14.4.7
Patched versions
14.10
14.4.7
Impact
The Document script API returns directly a DocumentAuthors allowing to set any authors to the document, which in consequence can allow subsequent executions of scripts since this author is used for checking rights.
Example of such attack:
{{velocity}}
$doc.setContent('{{velocity}}$xcontext.context.authorReference{{/velocity}}')
$doc.authors.setContentAuthor('xwiki:XWiki.superadmin')
$doc.getRenderedContent()
{{/velocity}}
Patches
The problem has been patched in XWiki 14.10 and 14.4.7 by returning a safe script API.
Workarounds
There no easy workaround apart of upgrading.
References
- https://jira.xwiki.org/browse/XWIKI-20380
- xwiki/xwiki-platform@905cdd7
For more information
If you have any questions or comments about this advisory:
- Open an issue in Jira
- Email us at security ML
References
- GHSA-pwfv-3cvg-9m4c
- xwiki/xwiki-platform@905cdd7
- https://jira.xwiki.org/browse/XWIKI-20380
Published to the GitHub Advisory Database
Apr 12, 2023
Last updated
Apr 12, 2023
Related news
XWiki Commons are technical libraries common to several other top level XWiki projects. The Document script API returns directly a DocumentAuthors allowing to set any authors to the document, which in consequence can allow subsequent executions of scripts since this author is used for checking rights. The problem has been patched in XWiki 14.10 and 14.4.7 by returning a safe script API.