githubEdit

XWiki

XWiki is a collaborative wiki platform written in Java.


Discovery

# XWiki default ports
# 8080 - Jetty (common)
# 80/443 - behind reverse proxy

# Nmap fingerprint
nmap -sC -sV TARGET -p 8080
# http-title: XWiki - Main - Intro
# http-server-header: Jetty(10.0.20)

# robots.txt entries
/xwiki/bin/viewattachrev/
/xwiki/bin/viewrev/
/xwiki/bin/edit/
/xwiki/bin/save/
/xwiki/bin/delete/

CVE-2025-24893 - Unauthenticated RCE via Groovy Injection

Any user with edit right on a page can execute code (Groovy, Python, Velocity) with programming right by defining a wiki macro. This allows full access to the whole XWiki installation.

Affected Versions: < 15.10.11, < 16.4.1, < 16.5.0RC1

Reference: https://github.com/advisories/GHSA-9875-cw22-f7cx

Detection

Exploitation

POC: https://github.com/gunzf0x/CVE-2025-24893

Payload Structure

The exploit injects Groovy code via the SolrSearch endpoint:

Reverse Shell

Standard reverse shells may not work directly. Use staged payload:


Post-Exploitation

Configuration Files

Extracting Database Credentials

Database Access

XWiki typically uses MySQL/MariaDB:

Password Storage

  • XWiki uses salted SHA-512 hashing by default

  • Password hashes stored in xwikistrings table

  • User data distributed across xwikidoc and related tables

Credential Reuse

Database passwords often reused for system accounts:


XWiki Paths Reference

Path
Description

/xwiki/bin/view/Main/

Main wiki page

/xwiki/bin/edit/

Edit pages (requires auth)

/xwiki/bin/get/Main/SolrSearch

Solr search endpoint (CVE target)

/etc/xwiki/

Config directory

/var/lib/xwiki/data

Data directory

/var/log/xwiki

Log directory

Last updated