Skip to content

XWiki allows RCE from script right in configurable sections

Critical severity GitHub Reviewed Published Dec 12, 2024 in xwiki/xwiki-platform • Updated Dec 12, 2024

Package

maven org.xwiki.platform:xwiki-platform-administration-ui (Maven)

Affected versions

>= 2.3, < 15.10.9
>= 16.0.0-rc-1, < 16.3.0

Patched versions

15.10.9
16.3.0

Description

Impact

Any user with script rights can perform arbitrary remote code execution by adding instances of XWiki.ConfigurableClass to any page. This compromises the confidentiality, integrity and availability of the whole XWiki installation.

To reproduce on a instance, as a user with script rights, edit your user profile and add an object of type XWiki.ConfigurableClass ("Custom configurable sections").
Set "Display in section" and "Display in category" to other, "Scope" to Wiki and all spaces and "Heading" to:

#set($codeToExecute = 'Test') #set($codeToExecuteResult = '{{async}}{{groovy}}services.logging.getLogger("attacker").error("Attack from Heading succeeded!"){{/groovy}}{{/async}}')

Save the page and view it, then add ?sheet=XWiki.AdminSheet&viewer=content&section=other to the URL.
If the logs contain "attacker - Attack from Heading succeeded!", then the instance is vulnerable.

Patches

This has been patched in XWiki 15.10.9 and 16.3.0.

Workarounds

We're not aware of any workaround except upgrading.

References

For more information

If you have any questions or comments about this advisory:

References

@manuelleduc manuelleduc published to xwiki/xwiki-platform Dec 12, 2024
Published to the GitHub Advisory Database Dec 12, 2024
Reviewed Dec 12, 2024
Published by the National Vulnerability Database Dec 12, 2024
Last updated Dec 12, 2024

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

EPSS score

0.045%
(17th percentile)

Weaknesses

CVE ID

CVE-2024-55879

GHSA ID

GHSA-r279-47wg-chpr

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.