Improper Control of Generation of Code ('Code Injection') Affecting org.xwiki.platform:xwiki-platform-administration-ui package, versions [2.3,14.10.15)[15.6-rc-1,15.7-rc-1)[15.0-rc-1,15.5.2)


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.14% (51st 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 Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGXWIKIPLATFORM-6129509
  • published17 Dec 2023
  • disclosed16 Dec 2023
  • creditUnknown

Introduced: 16 Dec 2023

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

How to fix?

Upgrade org.xwiki.platform:xwiki-platform-administration-ui to version 14.10.15, 15.7-rc-1, 15.5.2 or higher.

Overview

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') via the administration interface due to improper user input sanitization. An attacker can gain programming rights and execute arbitrary code by injecting malicious content into the XWiki.ConfigurableClass object within the object editor. This is only exploitable if the attacker can edit wiki pages.

Workaround

It is possible to manually apply the fixes for the vulnerability by editing two pages in the wiki. This patch must be applied to the page XWiki.ConfigurableClassMacros. Further, the following patches need to be applied to the page XWiki.ConfigurableClass:

749f6ae#diff-bf419a99140f3c12fd78ea30f855b63cfb74c1c976ff4436898266d9b37ad3ce

1157c1e#diff-bf419a99140f3c12fd78ea30f855b63cfb74c1c976ff4436898266d9b37ad3ce

0f367aa

Note that also the page XWiki.ConfigurableClass needs to be changed to xwiki/2.1 syntax for the escaping to work correctly but the security vulnerability is also fixed without changing the syntax.

CVSS Scores

version 3.1