CVE-2023-40177

9.9 CRITICAL

📋 TL;DR

This vulnerability allows any registered user in XWiki Platform to execute arbitrary scripts with programming rights via their user profile content field, effectively escalating privileges. It affects XWiki versions 4.3M2 through 14.10.4 and 15.0, enabling attackers to gain administrative control over the wiki.

💻 Affected Systems

Products:
  • XWiki Platform
Versions: 4.3M2 through 14.10.4 and 15.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires AppWithinMinutes Application feature enabled (default in affected versions). Any registered user can exploit this vulnerability.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the XWiki instance where an attacker gains programming rights, can execute arbitrary code, modify all content, access sensitive data, and potentially compromise the underlying server.

🟠

Likely Case

Privilege escalation where authenticated users gain programming rights to modify wiki content, install malicious extensions, or access restricted areas.

🟢

If Mitigated

Limited impact if proper access controls and monitoring are in place, though the vulnerability still provides unauthorized privilege escalation capabilities.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated user access but is straightforward once authenticated. The vulnerability is well-documented in public advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 14.10.5 and 15.1RC1

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-5mf8-v43w-mfxp

Restart Required: Yes

Instructions:

1. Upgrade to XWiki 14.10.5 or 15.1RC1 or later. 2. Restart the XWiki service. 3. Verify the AppWithinMinutes.Content page has been updated with the proper display script service usage.

🔧 Temporary Workarounds

Disable user profile content field

all

Temporarily disable or restrict the content field in user profiles to prevent exploitation.

Modify XWiki configuration to remove or restrict the Content field from user profile pages

Restrict user registration

all

Disable new user registration to limit potential attackers.

Set xwiki.cfg property 'xwiki.authentication.registration' to false

🧯 If You Can't Patch

  • Implement strict access controls and monitor all user profile modifications
  • Disable AppWithinMinutes Application feature if not required

🔍 How to Verify

Check if Vulnerable:

Check XWiki version: if between 4.3M2 and 14.10.4 or exactly 15.0, the system is vulnerable. Verify AppWithinMinutes Application is enabled.

Check Version:

Check XWiki administration panel or view xwiki.properties file for version information

Verify Fix Applied:

After patching, verify version is 14.10.5+ or 15.1RC1+. Check that user profile content field no longer executes with programming rights.

📡 Detection & Monitoring

Log Indicators:

  • Unusual user profile modifications
  • Script execution from user profile content
  • Privilege escalation attempts

Network Indicators:

  • Unexpected administrative actions from non-admin users

SIEM Query:

source="xwiki.log" AND ("user profile" OR "AppWithinMinutes.Content") AND ("script" OR "execute" OR "privilege")

🔗 References

📤 Share & Export