Miggo Logo

CVE-2024-55877: XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList

10

CVSS Score
3.1

Basic Information

EPSS Score
0.98348%
Published
12/12/2024
Updated
12/12/2024
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.platform:xwiki-platform-help-uimaven>= 9.7-rc-1, < 15.10.1115.10.11
org.xwiki.platform:xwiki-platform-help-uimaven>= 16.0.0-rc-1, < 16.4.116.4.1
org.xwiki.platform:xwiki-platform-help-uimaven>= 16.5.0-rc-1, < 16.5.016.5.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper output escaping in the XWikiSyntaxMacrosList page's rendering logic. The #translateOrElse macro in the Velocity template handled untrusted user input (macro descriptions) without adequate escaping. Before the patch, when a translation key wasn't found, it directly output the fallback value ($fallback) without sanitization. This allowed attackers to inject Groovy code via macro descriptions that would execute when the macros list was rendered. The commit 40e1afe explicitly adds $services.rendering.escape() to the fallback output path, confirming this was the vulnerable code path. The test cases added in the patch verify proper escaping of dangerous characters, further validating this as the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t *ny us*r wit* *n ***ount **n p*r*orm *r*itr*ry r*mot* *o** *x**ution *y ***in* inst*n**s o* `XWiki.WikiM**ro*l*ss` to *ny p***. T*is *ompromis*s t** *on*i**nti*lity, int**rity *n* *v*il**ility o* t** w*ol* XWiki inst*ll*tion. To r*pro*u**

Reasoning

T** vuln*r**ility st*ms *rom improp*r output *s**pin* in t** XWikiSynt*xM**rosList p***'s r*n**rin* lo*i*. T** #tr*nsl*t*Or*ls* m**ro in t** V*lo*ity t*mpl*t* **n*l** untrust** us*r input (m**ro **s*riptions) wit*out ***qu*t* *s**pin*. ***or* t** p*t