Miggo Logo

CVE-2024-47765:
Minecraft MOTD Parser's HtmlGenerator vulnerable to XSS

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.21832%
Published
10/4/2024
Updated
11/13/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
dev-lancer/minecraft-motd-parsercomposer<= 1.0.51.0.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two specific lines in HtmlGenerator.php's generate() method: 1) Line 49 inserts the 'color' value into a style attribute without escaping, enabling attribute injection. 2) Line 80 inserts the 'text' value into HTML content without escaping, enabling script injection. Both locations directly use user-controlled input (MOTD data) in HTML contexts without sanitization, meeting XSS vulnerability criteria. The provided proof-of-concept and patch (which adds HTML entity escaping at these exact locations) confirm these as the vulnerable points within the generate() method.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry T** `*tml**n*r*tor` *l*ss is su*j**t to pot*nti*l *ross-sit* s*riptin* (XSS) *tt**k t*rou** * p*rs** m*l*orm** Min**r**t s*rv*r MOT*. ### *ont*xt Min**r**t s*rv*r own*rs **n s*t * so-**ll** MOT* (M*ss*** o* t** **y) *or t**ir s*rv*r t**t

Reasoning

T** vuln*r**ility st*ms *rom two sp**i*i* lin*s in `*tml**n*r*tor.p*p`'s `**n*r*t*()` m*t*o*: *) Lin* ** ins*rts t** '*olor' v*lu* into * styl* *ttri*ut* wit*out *s**pin*, *n**lin* *ttri*ut* inj**tion. *) Lin* ** ins*rts t** 't*xt' v*lu* into *TML *o