CVE-2025-54385

9.8 CRITICAL

📋 TL;DR

This CVE describes a critical SQL injection vulnerability in XWiki Platform that allows attackers to execute arbitrary SQL queries on Oracle databases. The vulnerability affects XWiki versions 16.10.5 and below, and versions between 17.0.0-rc1 to 17.2.2. Attackers can exploit this through XWiki's searchDocuments APIs which pass unsanitized queries to Hibernate.

💻 Affected Systems

Products:
  • XWiki Platform
Versions: 16.10.5 and below, and 17.0.0-rc1 to 17.2.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects deployments using Oracle database backend. Other database backends are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution via Oracle database functions like DBMS_XMLGEN or DBMS_XMLQUERY.

🟠

Likely Case

Data exfiltration, unauthorized data modification, and potential privilege escalation within the XWiki application and underlying Oracle database.

🟢

If Mitigated

Limited impact if proper network segmentation, database user privilege restrictions, and input validation are in place, though SQL injection would still be possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access to XWiki APIs. The vulnerability is in core search functionality that's widely used.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 16.10.6 and 17.3.0-rc-1

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-p9qm-p942-q3w5

Restart Required: Yes

Instructions:

1. Upgrade to XWiki 16.10.6 or 17.3.0-rc-1 or later. 2. Restart the XWiki application server. 3. Verify the fix by checking the version and testing search functionality.

🔧 Temporary Workarounds

Restrict Database User Privileges

all

Limit the database user account permissions to prevent execution of dangerous Oracle functions like DBMS_XMLGEN and DBMS_XMLQUERY.

REVOKE EXECUTE ON DBMS_XMLGEN FROM xwiki_user;
REVOKE EXECUTE ON DBMS_XMLQUERY FROM xwiki_user;

Input Validation Filter

all

Implement application-level filtering to block queries containing Oracle-specific function calls in search parameters.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate XWiki servers from other critical systems
  • Enable detailed logging and monitoring of all database queries from XWiki application

🔍 How to Verify

Check if Vulnerable:

Check XWiki version and verify if using Oracle database backend. Versions 16.10.5 or below, or between 17.0.0-rc1 to 17.2.2 are vulnerable.

Check Version:

Check XWiki administration panel or view xwiki.cfg/xwiki.properties configuration files for version information.

Verify Fix Applied:

Verify version is 16.10.6 or higher, or 17.3.0-rc-1 or higher. Test search functionality to ensure it works without errors.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs containing DBMS_XMLGEN or DBMS_XMLQUERY functions
  • Multiple failed search attempts with unusual parameters
  • Unexpected database privilege escalation attempts

Network Indicators:

  • Unusual database traffic patterns from XWiki application servers
  • Large data transfers from database to XWiki servers

SIEM Query:

source="database_logs" AND ("DBMS_XMLGEN" OR "DBMS_XMLQUERY") AND source_ip="xwiki_server_ip"

🔗 References

📤 Share & Export