CVE-2023-45137

9.0 CRITICAL

📋 TL;DR

This is a stored cross-site scripting (XSS) vulnerability in XWiki Platform that allows attackers to inject malicious scripts into error messages when creating documents. The vulnerability affects XWiki installations where users can create documents, potentially allowing session hijacking, credential theft, or unauthorized actions. Attackers must first create a document with malicious content in its name to exploit this vulnerability.

💻 Affected Systems

Products:
  • XWiki Platform
  • XWiki Platform Web
  • XWiki Platform Web Templates
Versions: org.xwiki.platform:xwiki-platform-web from 3.1-milestone-2 to before 13.4-rc-1; org.xwiki.platform:xwiki-platform-web-templates before 14.10.12 and 15.5-rc-1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires document creation privileges to exploit. The vulnerability is in the createinline.vm template file.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover, session hijacking, credential theft, or installation of backdoors through malicious JavaScript execution in users' browsers.

🟠

Likely Case

Session hijacking or credential theft when users encounter the malicious error message, potentially leading to unauthorized access to wiki content.

🟢

If Mitigated

Limited impact with proper Content Security Policy (CSP) headers and input validation, though XSS could still execute in some contexts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires document creation privileges and involves creating a document with malicious content in its name, then triggering the error condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: org.xwiki.platform:xwiki-platform-web 13.4-rc-1 or later; org.xwiki.platform:xwiki-platform-web-templates 14.10.12 or 15.5-rc-1 or later

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-93gh-jgjj-r929

Restart Required: Yes

Instructions:

1. Upgrade to patched versions. 2. For manual patching, apply changes from commit ed8ec747967f8a16434806e727a57214a8843581 to createinline.vm template. 3. Restart XWiki service.

🔧 Temporary Workarounds

Restrict Document Creation

all

Limit document creation privileges to trusted users only to prevent exploitation.

Apply Content Security Policy

all

Implement strict CSP headers to mitigate XSS impact.

🧯 If You Can't Patch

  • Implement strict input validation for document names to block malicious characters
  • Deploy web application firewall (WAF) rules to detect and block XSS payloads

🔍 How to Verify

Check if Vulnerable:

Check XWiki version and verify if createinline.vm template lacks proper escaping for error messages in document creation.

Check Version:

Check XWiki administration panel or examine WAR file version metadata.

Verify Fix Applied:

Verify version is patched or check that createinline.vm template includes proper HTML escaping for error messages.

📡 Detection & Monitoring

Log Indicators:

  • Unusual document creation attempts with special characters in names
  • Multiple failed document creation attempts triggering error messages

Network Indicators:

  • HTTP requests containing XSS payloads in document creation parameters

SIEM Query:

Search for document creation events with suspicious characters (<, >, ", ', &, etc.) in document names

🔗 References

📤 Share & Export