CVE-2023-46243
📋 TL;DR
This vulnerability in XWiki Platform allows authenticated users with edit rights to execute arbitrary Groovy code on the server by exploiting improper input validation in document editing URLs. The code executes with the permissions of the document's content author, potentially leading to server compromise. All XWiki installations below versions 14.10.6 and 15.2RC1 are affected.
💻 Affected Systems
- XWiki Platform
📦 What is this software?
Xwiki by Xwiki
Xwiki by Xwiki
⚠️ Risk & Real-World Impact
Worst Case
Complete server takeover through remote code execution, data exfiltration, lateral movement, and persistent backdoor installation.
Likely Case
Unauthorized data access, privilege escalation, and modification of wiki content by authenticated attackers.
If Mitigated
Limited impact if proper network segmentation and least privilege principles are enforced, though code execution risk remains.
🎯 Exploit Status
The advisory includes a working exploit example. Attack requires authentication with edit permissions but is trivial to execute once authenticated.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 14.10.6 or 15.2RC1
Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-g2qq-c5j9-5w5w
Restart Required: Yes
Instructions:
1. Backup your XWiki installation and database. 2. Download XWiki version 14.10.6 or 15.2RC1 from official sources. 3. Stop the XWiki service. 4. Replace the existing installation with the patched version. 5. Restart the XWiki service. 6. Verify the update was successful.
🔧 Temporary Workarounds
No known workarounds
allThe vendor advisory states there are no known workarounds for this vulnerability.
🧯 If You Can't Patch
- Restrict edit permissions to only absolutely necessary trusted users
- Implement network-level controls to limit access to XWiki from untrusted networks
🔍 How to Verify
Check if Vulnerable:
Check your XWiki version. If it's below 14.10.6 (for 14.x branch) or not 15.2RC1 (for 15.x branch), you are vulnerable.
Check Version:
Check the XWiki administration dashboard or examine the XWiki WAR file version.
Verify Fix Applied:
After patching, verify the version shows 14.10.6 or higher, or 15.2RC1 or higher. Test that the exploit URL no longer executes Groovy code.
📡 Detection & Monitoring
Log Indicators:
- Unusual Groovy script execution in logs
- Multiple edit requests with encoded content parameters
- Requests to /xwiki/bin/edit/ with content parameter containing {{groovy}}
Network Indicators:
- HTTP requests with URL-encoded Groovy code in parameters
- Patterns matching /xwiki/bin/edit//?content=%7B%7Bgroovy%7D%7D
SIEM Query:
url:"/xwiki/bin/edit/" AND (content:"{{groovy}}" OR content:"%7B%7Bgroovy%7D%7D")
🔗 References
- https://github.com/xwiki/xwiki-platform/commit/a0e6ca083b36be6f183b9af33ae735c1e02010f4
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-g2qq-c5j9-5w5w
- https://jira.xwiki.org/browse/XWIKI-20385
- https://github.com/xwiki/xwiki-platform/commit/a0e6ca083b36be6f183b9af33ae735c1e02010f4
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-g2qq-c5j9-5w5w
- https://jira.xwiki.org/browse/XWIKI-20385