Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!
XWiki-Platform-RCE-CVE-2025-24893 — Bash exploit for CVE-2025-24893, unauthenticated RCE in XWiki Platform, using template injection in the SolrSearch macro to execute arbitrary system commands. | Kitploit
Bash exploit for CVE-2025-24893, unauthenticated RCE in XWiki Platform, using template injection in the SolrSearch macro to execute arbitrary system commands.
This script is a refurbished Bash implementation of an exploit targeting the XWiki Platform versions affected by CVE-2025-24893. It leverages a critical unauthenticated remote code execution vulnerability that allows attackers to execute arbitrary Groovy code via a template injection flaw in the SolrSearch macro.
The original exploit implementations in Python were created by various security researchers and are adapted here for Bash users with simplified execution and enhanced usability.
Vulnerability Details
Discoverer: John Kwak (Trend Micro's Zero Day Initiative)
Description: The vulnerability stems from improper input sanitization in the SolrSearch macro within XWiki Platform. The macro fails to properly validate and sanitize user-supplied input in the text parameter when accessed via the RSS media endpoint, allowing attackers to inject malicious Groovy code into the rendering pipeline without authentication.
Affected & Patched Versions
Affected Versions
XWiki Platform: 5.3-milestone-2 through 15.10.10
XWiki Platform: 16.0.0-rc-1 through 16.4.0
Patched Versions
XWiki 15.10.11 or later
XWiki 16.4.1 or later
XWiki 16.5.0RC1 or later
Features
Unauthenticated RCE: Execute arbitrary system commands without authentication.
CSRF Token Bypass: Exploits template injection without requiring CSRF tokens.
Background Execution: Runs commands asynchronously on the target server.
Simple Command-Line Interface: Easy-to-use Bash script with minimal dependencies.
Prerequisites
Dependencies:
curl: For sending HTTP requests.
jq: For URL encoding the payload.
Bash shell.
Tested Environment: Linux OS with Bash.
Usage
Provide the Execution permissions:
root@kitploit:~
chmod +x CVE-2025-24893
Run the script with the required arguments:
root@kitploit:~
./CVE-2025-24893 <target_url> <command>
Parameters
Parameter
Description
<target_url>
The target XWiki URL (e.g., http://example.com or https://xwiki.example.org). Protocol is optional.
<command>
The system command to execute on the target server.
Example
Check if target is vulnerable (execute id command):
Requires the target to have the SolrSearch macro enabled (default configuration).
Credits
Vulnerability Discoverer: John Kwak (Trend Micro's Zero Day Initiative)
Original Python Exploit Authors: Various security researchers
Adapted Script: Refurbished by [0xdtc] Built in BASH
Disclaimer
This script is for educational purposes only. Unauthorized use of this tool against systems you do not own or have explicit permission to test is illegal and unethical. Use responsibly.
You must have explicit written permission from the system owner before testing.
The author(s) of this tool are not responsible for any misuse or damage caused by this script. Users are solely responsible for ensuring they have proper authorization and comply with all applicable laws and regulations.