Eval Injection Affecting org.xwiki.platform:xwiki-platform-search-ui package, versions [,14.10.20)[15.0-rc-1,15.5.4)[15.6-rc-1,15.10-rc-1)


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.06% (30th 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 Eval Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGXWIKIPLATFORM-6595837
  • published11 Apr 2024
  • disclosed10 Apr 2024
  • creditUnknown

Introduced: 10 Apr 2024

CVE-2024-31982  (opens in a new tab)
CWE-95  (opens in a new tab)

How to fix?

Upgrade org.xwiki.platform:xwiki-platform-search-ui to version 14.10.20, 15.5.4, 15.10-rc-1 or higher.

Overview

org.xwiki.platform:xwiki-platform-search-ui is a Platform Search UI which allows searching on the full wiki using wildcards, searching by space, getting search result RSS feeds and more. By default provides a Database-backed search but allows pluging other engines (such as Lucene, Solr and more)

Affected versions of this package are vulnerable to Eval Injection via the database search functionality. An attacker can execute arbitrary code on the server by injecting malicious code into search text. This vulnerability is exploitable by any visitor to a public wiki or a user of a closed wiki, as the database search is accessible by default to all users. This impacts the confidentiality, integrity, and availability of the entire XWiki installation.

Workaround

This vulnerability can be mitigated by manually applying the patch to the Main.DatabaseSearch page. Alternatively, the database search page can be deleted as it is not the default search interface of XWiki.

PoC

<hostname>/xwiki/bin/get/Main/DatabaseSearch?outputSyntax=plain&text=%7D%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bgroovy%7D%7Dprintln%28%22Hello%20from%22%20%2B%20%22%20search%20text%3A%22%20%2B%20%2823%20%2B%2019%29%29%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fasync%7D%7D%20

CVSS Scores

version 3.1