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

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

  • https://jira.xwiki.org/browse/XWIKI-22030
  • https://github.com/xwiki/xwiki-platform/commit/40e1afe001d61eafdf13f3621b4b597a0e58a3e3

Basic information

Type
reviewed
Severity
critical
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2024-12-12 19:21:06 UTC
Updated
2025-04-30 20:39:47 UTC
GitHub reviewed
2024-12-12 19:21:06 UTC
NVD published
2024-12-12

EPSS Score

Score Percentile
27.48% 96.29%

CVSS Scores

Base score Version Severity Vector
10.0 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.

Identifiers

CWEs

CWE id Name
CWE-94 Improper Control of Generation of Code ('Code Injection')
CWE-96 Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')

Affected packages (3)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
maven org.xwiki.platform:xwiki-platform-help-ui >= 9.7-rc-1, < 15.10.11 15.10.11
maven org.xwiki.platform:xwiki-platform-help-ui >= 16.0.0-rc-1, < 16.4.1 16.4.1
maven org.xwiki.platform:xwiki-platform-help-ui >= 16.5.0-rc-1, < 16.5.0 16.5.0

References

cvelogic Threat Intelligence