Skip to content

XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList

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

Package

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

Affected versions

>= 9.7-rc-1, < 15.10.11
>= 16.0.0-rc-1, < 16.4.1
>= 16.5.0-rc-1, < 16.5.0

Patched versions

15.10.11
16.4.1
16.5.0

Description

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

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
Low
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:L/UI:N/S:C/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2024-55877

GHSA ID

GHSA-2r87-74cx-2p7c

Source code

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