Arbitrary Code Execution Affecting org.xwiki.platform:xwiki-platform-legacy-notification-activitymacro package, versions [10.9,13.10.11)[14.0-rc-1,14.4.7)[14.5,14.10)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (72nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGXWIKIPLATFORM-5421184
  • published13 Apr 2023
  • disclosed12 Apr 2023
  • creditUnknown

Introduced: 12 Apr 2023

CVE-2023-29209  (opens in a new tab)
CWE-95  (opens in a new tab)

How to fix?

Upgrade org.xwiki.platform:xwiki-platform-legacy-notification-activitymacro to version 13.10.11, 14.4.7, 14.10 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution such that any user with view rights on commonly accessible documents including the legacy notification activity macro can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root cause is improper escaping of the macro parameters of the legacy notification activity macro. This macro is installed by default in XWiki.

PoC

{{activity wikis="~" /~}~} {{async async=~"true~" cached=~"false~" context=~"doc.reference~"~}~}{{groovy~}~}println(~"Hello from Groovy!~"){{/groovy~}~}"/}}

If the output of this macro is

The [notifications] macro is a standalone macro and it cannot be used inline. Click on this message for details.
Hello from Groovy!"    displayMinorEvents="false" displayRSSLink="false" /}}

or similar, the XWiki installation is vulnerable. The vulnerability can be exploited via every wiki page that is editable including the user's profile, but also with just view rights using the HTMLConverter that is part of the CKEditor integration which is bundled with XWiki.

CVSS Scores

version 3.1