CVE-2023-31126

9.0 CRITICAL

📋 TL;DR

This vulnerability in XWiki's XML library allows attackers to inject arbitrary HTML code through invalid data attributes, leading to cross-site scripting (XSS) attacks. It affects XWiki installations using the vulnerable HTML sanitizer component. Users of XWiki versions 14.6-rc-1 through 14.10.3 are impacted.

💻 Affected Systems

Products:
  • XWiki
  • XWiki Commons XML library
Versions: 14.6-rc-1 through 14.10.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the HTML sanitizer component; restricted cleaning in HTMLCleaner is not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of user sessions, account takeover, data theft, and potential server-side code execution if combined with other vulnerabilities.

🟠

Likely Case

Session hijacking, credential theft, defacement of wiki pages, and unauthorized actions performed as authenticated users.

🟢

If Mitigated

Limited impact if proper Content Security Policies are enforced and user input validation is implemented at application layer.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires user interaction (viewing malicious content) but doesn't require authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 14.10.4 or 15.0 RC1

Vendor Advisory: https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-pv7v-ph6g-3gxv

Restart Required: Yes

Instructions:

1. Backup your XWiki installation. 2. Download XWiki 14.10.4 or 15.0 RC1 from official sources. 3. Follow XWiki upgrade documentation for your deployment method. 4. Restart the XWiki service/application server.

🔧 Temporary Workarounds

No workarounds available

all

The advisory states there are no known workarounds apart from upgrading.

🧯 If You Can't Patch

  • Implement strict Content Security Policy headers to limit script execution
  • Deploy web application firewall rules to block suspicious HTML attribute patterns

🔍 How to Verify

Check if Vulnerable:

Check XWiki version via Admin dashboard or by examining the WAR file version. Versions between 14.6-rc-1 and 14.10.3 are vulnerable.

Check Version:

Check XWiki Admin dashboard or examine META-INF/MANIFEST.MF in xwiki-platform-web-war-*.war

Verify Fix Applied:

Verify XWiki version is 14.10.4 or higher, or 15.0 RC1 or higher. Test HTML sanitization with malicious data attributes.

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTML content submissions
  • Multiple failed sanitization attempts
  • Suspicious data-* attribute patterns in user content

Network Indicators:

  • HTTP requests containing malformed HTML attributes
  • Patterns matching data attribute injection attempts

SIEM Query:

web.url:*data-* AND (web.url:*\/* OR web.url:*>* OR web.url:*<*)

🔗 References

📤 Share & Export