CVE-2023-35162

9.6 CRITICAL

📋 TL;DR

This is a cross-site scripting (XSS) vulnerability in XWiki Platform that allows attackers to inject malicious JavaScript via specially crafted URLs. The vulnerability affects all XWiki installations from version 6.1-rc-1 through 14.10.4, potentially enabling session hijacking, credential theft, or malware distribution.

💻 Affected Systems

Products:
  • XWiki Platform
Versions: 6.1-rc-1 through 14.10.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All XWiki installations with the vulnerable previewactions template are affected regardless of configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover, data exfiltration, or malware deployment to all users visiting malicious links

🟠

Likely Case

Session hijacking, credential theft, or defacement of wiki pages

🟢

If Mitigated

Limited impact if proper Content Security Policy (CSP) headers are implemented and user awareness training is in place

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit example provided in advisory shows simple URL construction requiring no authentication

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 14.10.5 or 15.1-rc-1

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-q9hg-9qj2-mxf9

Restart Required: Yes

Instructions:

1. Backup your XWiki installation. 2. Upgrade to XWiki 14.10.5 or 15.1-rc-1. 3. Restart the XWiki service. 4. Verify the fix by checking version and testing exploit URL.

🔧 Temporary Workarounds

Disable previewactions template

all

Remove or restrict access to the vulnerable previewactions.vm template

mv /path/to/xwiki/templates/previewactions.vm /path/to/xwiki/templates/previewactions.vm.disabled

Implement Content Security Policy

all

Add CSP headers to prevent JavaScript execution from untrusted sources

Add to web server config: add_header Content-Security-Policy "default-src 'self'; script-src 'self'" always;

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block URLs containing 'javascript:' protocol in parameters
  • Restrict access to XWiki instance to trusted users only using network segmentation and authentication

🔍 How to Verify

Check if Vulnerable:

Test with exploit URL: <hostname>/xwiki/bin/get/FlamingoThemes/Cerulean?xpage=xpart&vm=previewactions.vm&xcontinue=javascript:alert('test')

Check Version:

Check XWiki version in administration panel or via: grep -r "version" /path/to/xwiki/WEB-INF/xwiki.properties

Verify Fix Applied:

After patching, the same exploit URL should not execute JavaScript

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests containing 'previewactions.vm' with 'javascript:' in parameters
  • Unusual JavaScript execution in user sessions

Network Indicators:

  • Outbound connections to suspicious domains following XWiki access
  • Unusual traffic patterns from XWiki server

SIEM Query:

source="xwiki.log" AND "previewactions.vm" AND "javascript:"

🔗 References

📤 Share & Export