CVE-2024-38369

9.9 CRITICAL

📋 TL;DR

This vulnerability in XWiki Platform allows privilege escalation through macro execution context manipulation. When using the include macro, content executes with the includer's permissions rather than the author's, enabling attackers to impersonate higher-privileged users. All XWiki instances using vulnerable versions are affected.

💻 Affected Systems

Products:
  • XWiki Platform
Versions: All versions before XWiki 15.0 RC1
Operating Systems: All platforms running XWiki
Default Config Vulnerable: ⚠️ Yes
Notes: All XWiki installations using the include macro are vulnerable by default. The vulnerability requires authenticated users with document editing permissions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise where any authenticated user can execute arbitrary code with administrative privileges, leading to data theft, system takeover, or lateral movement.

🟠

Likely Case

Privilege escalation allowing regular users to perform administrative actions, modify critical content, or access restricted data.

🟢

If Mitigated

Limited impact if proper access controls restrict who can edit documents and use include macros.

🌐 Internet-Facing: HIGH - Publicly accessible XWiki instances are directly exploitable by any authenticated user.
🏢 Internal Only: HIGH - Internal instances remain vulnerable to authenticated internal users.

🎯 Exploit Status

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

Exploitation requires authenticated access but is straightforward once authenticated. The advisory includes technical details that facilitate exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: XWiki 15.0 RC1 and later

Vendor Advisory: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-qcj3-wpgm-qpxh

Restart Required: Yes

Instructions:

1. Backup your XWiki instance. 2. Upgrade to XWiki 15.0 RC1 or later. 3. Restart the XWiki application server. 4. Verify the upgrade completed successfully.

🔧 Temporary Workarounds

Disable include macro globally

all

Remove or restrict the include macro to prevent exploitation

Edit xwiki.cfg or xwiki.properties to disable the include macro

Restrict document editing permissions

all

Limit which users can edit documents to reduce attack surface

Configure XWiki rights to restrict edit permissions to trusted users only

🧯 If You Can't Patch

  • Implement strict access controls to limit document editing to minimal trusted users
  • Monitor and audit all include macro usage and document modifications

🔍 How to Verify

Check if Vulnerable:

Check XWiki version. If version is below 15.0 RC1, the system is vulnerable if include macro is enabled.

Check Version:

Check XWiki administration panel or view xwiki.cfg version property

Verify Fix Applied:

Verify XWiki version is 15.0 RC1 or later and test include macro functionality with different user permissions.

📡 Detection & Monitoring

Log Indicators:

  • Unusual include macro usage patterns
  • Document edits followed by include executions from different users
  • Permission escalation attempts in audit logs

Network Indicators:

  • Multiple document edit requests from single user followed by include requests

SIEM Query:

source="xwiki.log" AND ("include reference" OR "macro execution") AND user_change

🔗 References

📤 Share & Export