Miggo Logo

CVE-2025-49582: XWiki's required right warnings for macros are incomplete

8.6

CVSS Score
4.0

Basic Information

EPSS Score
0.52786%
Published
6/13/2025
Updated
6/13/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.xwiki.platform:xwiki-platform-rendering-xwikimaven>= 15.9-rc-1, < 16.4.716.4.7
org.xwiki.platform:xwiki-platform-rendering-xwikimaven>= 16.5.0-rc-1, < 16.10.316.10.3
org.xwiki.platform:xwiki-platform-rendering-xwikimaven>= 17.0.0-rc-1, < 17.0.017.0.0
org.xwiki.platform:xwiki-platform-rendering-macro-cachemaven>= 15.9-rc-1, < 16.4.716.4.7
org.xwiki.platform:xwiki-platform-rendering-macro-cachemaven>= 16.5.0-rc-1, < 16.10.316.10.3
org.xwiki.platform:xwiki-platform-rendering-macro-cachemaven>= 17.0.0-rc-1, < 17.0.017.0.0
org.xwiki.platform:xwiki-platform-security-requiredrights-defaultmaven>= 15.9-rc-1, < 16.4.716.4.7
org.xwiki.platform:xwiki-platform-security-requiredrights-defaultmaven>= 16.5.0-rc-1, < 16.10.317.0.0
org.xwiki.platform:xwiki-platform-security-requiredrights-defaultmaven>= 17.0.0-rc-1, < 17.0.017.0.0
org.xwiki.platform:xwiki-platform-rendering-macro-contextmaven>= 15.9-rc-1, < 16.4.716.4.7
org.xwiki.platform:xwiki-platform-rendering-macro-contextmaven>= 16.5.0-rc-1, < 16.10.316.10.3
org.xwiki.platform:xwiki-platform-rendering-macro-contextmaven>= 17.0.0-rc-1, < 17.0.017.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in several XWiki macro rights analyzers having incomplete or flawed logic, allowing attackers to craft macro invocations that bypass proper rights warnings. This could lead to remote code execution if a privileged user edits a page containing such malicious macros.

The specific issues identified and patched were:

  1. Incomplete Parameter Analysis: The DefaultMacroBlockRequiredRightAnalyzer.analyzeWithExceptions method did not sufficiently analyze macro parameters that could themselves contain renderable XWiki syntax. Attackers could hide malicious content in such parameters.
  2. Missing Analysis of 'source' Parameter: The ContextMacroRequiredRightsAnalyzer.analyze method failed to analyze the source parameter of the context macro. This meant content referenced via this parameter (including script variables) was not checked for required rights.
  3. Case-Sensitive Parameter Lookups: Several analyzers, including those for Cache, HTML, and Raw macros (CacheMacroRequiredRightsAnalyzer.analyze, HTMLMacroRequiredRightsAnalyzer.analyze, RawMacroRequiredRightsAnalyzer.analyze), used case-sensitive methods to retrieve critical parameters (e.g., "id", "wiki", "clean", "syntax"). Attackers could use different casings for these parameter names (e.g., "ID", "Wiki") to evade analysis.
  4. Missing Analyzer for 'content' Macro: The vulnerability description also mentions that the 'content' macro's 'source' parameter was not analyzed. This was addressed by adding a new analyzer (ContentMacroRequiredRightsAnalyzer) in commit 0a705e8e253cb871b804e25c53b2bde879c886bd. Since this was a missing component rather than a flawed existing function, its newly added functions are not listed as 'vulnerable' but as the fix.

The patches address these flaws by making parameter analysis more comprehensive, adding checks for previously uninspected parameters like 'source', and ensuring that parameter name lookups are case-insensitive. These changes aim to make the rights warnings more robust and prevent attackers from hiding malicious macro content.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t W**n **itin* *ont*nt t**t *ont*ins "**n**rous" m**ros lik* m*li*ious s*ript m**ros t**t w*r* *ut*or** *y * us*r wit* **w*r ri**ts, XWiki w*rns **out t** *x**ution o* t**s* m**ros sin** XWiki **.*R**. T**s* r*quir** ri**ts *n*lyz*rs t**t tr

Reasoning

T** vuln*r**ility li*s in s*v*r*l XWiki m**ro ri**ts *n*lyz*rs **vin* in*ompl*t* or *l*w** lo*i*, *llowin* *tt**k*rs to *r**t m**ro invo**tions t**t *yp*ss prop*r ri**ts w*rnin*s. T*is *oul* l*** to r*mot* *o** *x**ution i* * privil**** us*r **its *