CVE-2023-29201
📋 TL;DR
This vulnerability allows cross-site scripting (XSS) attacks in XWiki Commons' HTML cleaner restricted mode, which insufficiently filtered dangerous HTML elements and attributes. When exploited, it enables JavaScript injection that can lead to server-side code execution with programming rights if a privileged user views malicious content. All XWiki instances using affected versions are vulnerable.
💻 Affected Systems
- XWiki Commons
- XWiki Platform
📦 What is this software?
Xwiki by Xwiki
⚠️ Risk & Real-World Impact
Worst Case
Full compromise of XWiki instance with programming rights leading to data theft, content manipulation, and complete system takeover.
Likely Case
Privileged user executes malicious JavaScript leading to session hijacking, data exfiltration, or unauthorized content modifications.
If Mitigated
Limited impact with proper user privilege separation and external WAF filtering, though XSS vectors remain.
🎯 Exploit Status
Exploitation requires a privileged user with programming rights to view malicious content. The XSS vulnerability is straightforward to exploit once initial access is obtained.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 14.6 RC1 and later
Vendor Advisory: https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-m3jr-cvhj-f35j
Restart Required: Yes
Instructions:
1. Backup your XWiki instance. 2. Upgrade to XWiki 14.6 RC1 or later. 3. Restart the XWiki application server. 4. Verify the fix by checking version and testing HTML sanitization.
🔧 Temporary Workarounds
No official workarounds
allThe vendor states there are no known workarounds apart from upgrading.
🧯 If You Can't Patch
- Restrict programming rights to minimal trusted users only
- Implement external WAF with XSS filtering rules
🔍 How to Verify
Check if Vulnerable:
Check XWiki version: if between 4.2-milestone-1 and 14.5, you are vulnerable. Review if HTML cleaner restricted mode is used in custom applications.
Check Version:
Check XWiki administration panel or view xwiki.properties file for version information.
Verify Fix Applied:
After upgrade, verify version is 14.6 RC1 or later. Test HTML sanitization with known XSS payloads in restricted mode.
📡 Detection & Monitoring
Log Indicators:
- Unusual JavaScript execution in privileged user sessions
- HTML content with suspicious attributes like onload, onerror, or iframe tags
Network Indicators:
- Outbound connections to suspicious domains from XWiki server
- Unexpected POST requests with encoded HTML payloads
SIEM Query:
source="xwiki.log" AND ("<iframe" OR "javascript:" OR "onload=" OR "onerror=")
🔗 References
- https://github.com/xwiki/xwiki-commons/commit/4a185e0594d90cd4916d60aa60bb4333dc5623b2
- https://github.com/xwiki/xwiki-commons/commit/b11eae9d82cb53f32962056b5faa73f3720c6182
- https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-m3jr-cvhj-f35j
- https://jira.xwiki.org/browse/XCOMMONS-1680
- https://jira.xwiki.org/browse/XCOMMONS-2426
- https://jira.xwiki.org/browse/XWIKI-9118
- https://github.com/xwiki/xwiki-commons/commit/4a185e0594d90cd4916d60aa60bb4333dc5623b2
- https://github.com/xwiki/xwiki-commons/commit/b11eae9d82cb53f32962056b5faa73f3720c6182
- https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-m3jr-cvhj-f35j
- https://jira.xwiki.org/browse/XCOMMONS-1680
- https://jira.xwiki.org/browse/XCOMMONS-2426
- https://jira.xwiki.org/browse/XWIKI-9118