Vulnerability · Published Oct 4, 2024 · Assigned by GitHub_M
CVE-2024-47765Minecraft MOTD Parser's HtmlGenerator vulnerable to XSS
Medium 6.9
In plain English
A medium-severity cross-site scripting in MinecraftMotdParser from jgniecki. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 33% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Minecraft MOTD Parser is a PHP library to parse minecraft server motd. The HtmlGenerator class is subject to potential cross-site scripting (XSS) attack through a parsed malformed Minecraft server MOTD. The HtmlGenerator iterates through objects of MotdItem that are contained in an object of MotdItemCollection to generate a HTML string. An attacker can make malicious inputs to the color and text properties of MotdItem to inject own HTML into a web page during web page generation. For example by sending a malicious MOTD from a Minecraft server under their control that was queried and passed to the HtmlGenerator. This XSS vulnerability exists because the values of these properties are neither filtered nor escaped. This vulnerability is fixed in 1.0.6.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | dev-lancer/minecraft-motd-parser | 1.0.6 | GHSA-q898-frwq-f3qp |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| jgniecki | MinecraftMotdParser | < 1.0.6 |
Weakness: CWE-79, CWE-80 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N