
PoC, exploit, and Podman lab for CVE-2025-53837, an XWiki Rendering HTML macro eval injection that closes the macro and executes Groovy with programming rights.

Open-source exploitation framework with modular payload, encoder, and auxiliary system for penetration testing, vulnerability validation, and security research across networks and applications.

Automatic SQL injection and database takeover tool

The Browser Exploitation Framework Project
| CVE | CVE-2025-53837 (GHSA-26vp-8gxg-v4pg) |
| Component | XWiki Rendering — XHTMLWikiPrinter.printRaw() in xwiki-rendering-xml |
| Affected | XWiki Rendering < 14.10.2 / 15.0 RC1 (XWiki syntax 2.0) |
| Fixed in | commit 92bc8095 |
| CWE | CWE-94 improper control of code generation (eval injection) |
| Impact | Arbitrary Groovy/Python macro execution with programming rights |
| Vector | Any user who can edit their profile or a document with a UI extension |
| Trigger | Tilde-escaped {{/html}} in rendered output inside an {{html wiki="true"}} macro |
| Credit | Reporter via GitHub advisory / XWiki security team |
Rendering output was included as content of HTML macros without escaping. A user
able to edit a document could place tilde-escaped macro markers in that output;
once rendered, the text contained a literal {{/html}} that closed the surrounding
HTML macro and exposed an injected {{cache}}{{groovy}}... block. The macros run
with programming rights, giving remote code execution and unrestricted access to
all wiki content.
Vulnerable printRaw(raw) forwarded the string unchanged. Fixed (commit 92bc8095):
String escapedRaw = raw.replace("{{/html}}", "{{/html}}");
StringBuilder prefix = new StringBuilder();
for (Character nextChar : List.of('{', '/', 'h', 't', 'm', 'l', '}', '}')) {
prefix.append(nextChar);
if (escapedRaw.endsWith(prefix.toString())) {
escapedRaw = escapedRaw.substring(0, escapedRaw.length() - prefix.length())
+ "{" + prefix.substring(1);
break;
}
}
super.printRaw(escapedRaw);
The trailing-prefix escape prevents raw content and following plain text from combining into a closing marker. The harness uses the advisory's UI-extension payload, which renders to exactly:
{{/html}} {{cache}}{{groovy}}println(1){{/groovy}}{{/cache}}
On the vulnerable build the macro closes early and the Groovy macro is executable;
on the fixed build the marker is entity-escaped and stays inside the HTML macro.
Exact patch in evidence/.
One Podman image cve-2025-53837:vuln, version selected by XWIKI_VER (vuln /
fixed). A faithful Python service models tilde unescaping, printRaw, and macro
assembly. Bounded 2 CPU / 4 GB on cve53837lab.
podman build -t cve-2025-53837:vuln lab
podman build -t cve-2025-53837-poc:local -f poc/Dockerfile poc
podman network create cve53837lab
# run one container per XWIKI_VER, then use poc/ or exploit/
poc/poc.py and standalone exploit/exploit.py are stdlib-only, take the target
via argument, and report the rendered raw output, early macro close, and whether
the Groovy macro is executable. Exit 1 on injection, 0 on escaping, 2 unreachable.
| build | result |
|---|---|
| vuln | PRINTED_RAW={{/html}} {{cache}}{{groovy}}..., GROOVY_EXECUTABLE=true |
| fixed | PRINTED_RAW={{/html}} {{cache}}{{groovy}}..., GROOVY_EXECUTABLE=false |
The lab models the rendering pipeline rather than deploying XWiki. A real exploit requires the ability to edit a document or profile whose rendering output reaches an HTML macro, and syntax 2.0.
The fix covers JSON and HTML-comment outputs as well, and upstream added both a
macrohtml20.test fixture and a unit test for printRaw. evidence/0day-sweep.txt.
README.md, LICENSE, CITATION.cff, SECURITY.md, .gitignore, Makefile,
poc/, exploit/, lab/, evidence/.