CVE-2023-29509

9.9 CRITICAL

📋 TL;DR

This vulnerability allows any user with view rights on commonly accessible documents to execute arbitrary Groovy, Python, or Velocity code in XWiki, leading to full administrative access to the XWiki installation. The issue stems from improper escaping of the documentTree macro parameters in a default-installed page. All XWiki installations with the vulnerable versions are affected.

💻 Affected Systems

Products:
  • XWiki Commons
  • XWiki Platform
Versions: All versions before 13.10.11, 14.4.7, and 14.10
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerable documentTree macro is installed by default in FlamingoThemesCode.WebHome page, which is installed by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of the XWiki installation with complete administrative access, data theft, and potential lateral movement to connected systems.

🟠

Likely Case

Remote code execution leading to complete control over the XWiki instance, data exfiltration, and installation of backdoors.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege access controls are implemented, though code execution would still be possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires only view rights on commonly accessible documents, making it accessible to most users. The vulnerability is well-documented in public advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: XWiki 13.10.11, 14.4.7, or 14.10

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-f4v8-58f6-mwj4

Restart Required: Yes

Instructions:

1. Backup your XWiki installation and database. 2. Upgrade to XWiki 13.10.11, 14.4.7, or 14.10. 3. Restart the XWiki application server. 4. Verify the fix by checking the version and testing the vulnerability.

🔧 Temporary Workarounds

Remove vulnerable macro

all

Delete or restrict access to the FlamingoThemesCode.WebHome page containing the vulnerable documentTree macro

Access XWiki administration interface
Navigate to FlamingoThemesCode.WebHome
Delete or modify permissions

Restrict view permissions

all

Apply strict view permissions to limit access to commonly accessible documents

Access XWiki rights management
Review and restrict view permissions on all documents
Apply principle of least privilege

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate XWiki from critical systems
  • Apply aggressive monitoring and alerting for suspicious activity and code execution attempts

🔍 How to Verify

Check if Vulnerable:

Check XWiki version against affected versions. Review if FlamingoThemesCode.WebHome page exists with default permissions.

Check Version:

Check XWiki administration panel or view the XWiki version in the web interface footer.

Verify Fix Applied:

Verify XWiki version is 13.10.11, 14.4.7, or 14.10 or later. Test that documentTree macro no longer allows code injection.

📡 Detection & Monitoring

Log Indicators:

  • Unusual Groovy, Python, or Velocity script execution
  • Unexpected administrative actions
  • Suspicious document modifications

Network Indicators:

  • Unusual outbound connections from XWiki server
  • Data exfiltration patterns

SIEM Query:

source="xwiki" AND ("Groovy" OR "Python" OR "Velocity") AND event_type="code_execution"

🔗 References

📤 Share & Export