Miggo Logo

CVE-2025-53836:
XWiki Rendering is vulnerable to RCE attacks when processing nested macros

10

CVSS Score

Basic Information

EPSS Score
-
Published
7/14/2025
Updated
7/15/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.xwiki.rendering:xwiki-rendering-transformation-macromaven>= 4.2-milestone-1, < 13.10.1113.10.11
org.xwiki.rendering:xwiki-rendering-transformation-macromaven>= 14.0, < 14.4.714.4.7
org.xwiki.rendering:xwiki-rendering-transformation-macromaven>= 14.5, < 14.1014.10

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis of the provided patch commit c73fa3ccd4ac59057e48e5d4325f659e78e8f86d clearly indicates that the vulnerability is located in the DefaultMacroContentParser.java file. The core of the issue is within the createXDOM method. The vulnerability description states that the 'restricted' attribute of the transformation context was not preserved when processing nested macros. The patch confirms this by modifying the instantiation of TransformationContext. The original, vulnerable code (TransformationContext txContext = new TransformationContext(result, syntax);) created a new context that would not be restricted by default. The patch introduces logic to check the parent context's restricted status and pass it to the new context (new TransformationContext(result, syntax, isRestricted)). This change directly addresses the described vulnerability. Therefore, the createXDOM function is the vulnerable function, as it was responsible for creating the insecure nested execution context that could lead to Remote Code Execution (RCE).

Vulnerable functions

org.xwiki.rendering.internal.macro.DefaultMacroContentParser.createXDOM
xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java
The vulnerability lies in the `createXDOM` function, which is responsible for parsing and executing the content of a macro. Before the patch, when creating a new transformation context for nested content, it used `new TransformationContext(result, syntax)`, which does not preserve the 'restricted' status from the parent macro's context. This allowed a nested macro to execute with elevated privileges, bypassing security restrictions. The patch fixes this by explicitly checking if the parent context is restricted (`wrappingContext.isRestricted()`) and propagating this flag to the new `TransformationContext`.

WAF Protection Rules

WAF Rule

### Imp**t T** ****ult m**ro *ont*nt p*rs*r *i*n't pr*s*rv* t** r*stri*t** *ttri*ut* o* t** tr*ns*orm*tion *ont*xt w**n *x**utin* n*st** m**ros. T*is *llows *x**utin* m**ros t**t *r* norm*lly *or*i***n in r*stri*t** mo**, in p*rti*ul*r s*ript m**ros

Reasoning

T** *n*lysis o* t** provi*** p*t** *ommit `****************************************` *l**rly in*i**t*s t**t t** vuln*r**ility is lo**t** in t** `****ultM**ro*ont*ntP*rs*r.j*v*` *il*. T** *or* o* t** issu* is wit*in t** `*r**t*X*OM` m*t*o*. T** vuln*r