Miggo Logo

CVE-2025-24893: XWiki Platform allows remote code execution as guest via SolrSearchMacros request

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.99733%
Published
2/20/2025
Updated
2/20/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.xwiki.platform:xwiki-platform-search-solr-uimaven>= 5.3-milestone-2, < 15.10.1115.10.11
org.xwiki.platform:xwiki-platform-search-solr-uimaven>= 16.0.0-rc-1, < 16.4.116.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability allows remote code execution via a crafted 'text' parameter in a request to Main/SolrSearch when media=rss. The core issue lies in how the RSS feed content, which includes this user input, is rendered.

The commit 67021db9b8ed26c2236a653269302a86bf01ef40 patches this by modifying Main/SolrSearchMacros.xml.

  1. The outputRSSFeed macro within Main.SolrSearchMacros.xml was directly outputting the feed content using $xwiki.feed.getFeedOutput($feed, 'rss_2.0'). This direct output allowed the XWiki rendering engine to process any embedded scripts (like Groovy macros) within the feed content that originated from the user's 'text' parameter. This is where the vulnerability (unsafe rendering sink) was located. The patch changes this to use a new #rawResponse macro, which explicitly sets the content type and writes the data raw, crucially calling $xcontext.setFinished(true) to prevent further rendering and script execution.
  2. The handleSolrSearchRequest macro, also in Main.SolrSearchMacros.xml, is responsible for handling the incoming request. It takes the request.text (user input) and uses it to create the feed via $services.search.solr.createFeed(...). This feed is then passed to outputRSSFeed. Therefore, handleSolrSearchRequest is the function that processes the potentially malicious input and directs it to the vulnerable rendering logic in outputRSSFeed.

Both macros are identified: outputRSSFeed for containing the vulnerable rendering code and handleSolrSearchRequest for processing the malicious input and calling the vulnerable rendering part. The names provided are the Velocity macro names, which are the most precise identifiers in this context.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t *ny *u*st **n p*r*orm *r*itr*ry r*mot* *o** *x**ution t*rou** * r*qu*st to `SolrS**r**`. T*is imp**ts t** *on*i**nti*lity, int**rity *n* *v*il**ility o* t** w*ol* XWiki inst*ll*tion. To r*pro*u** on *n inst*n**, wit*out **in* lo**** in, *

Reasoning

T** vuln*r**ility *llows r*mot* *o** *x**ution vi* * *r**t** 't*xt' p*r*m*t*r in * r*qu*st to `M*in/SolrS**r**` w**n `m**i*=rss`. T** *or* issu* li*s in *ow t** RSS **** *ont*nt, w*i** in*lu**s t*is us*r input, is r*n**r**. T** *ommit `*************