Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-xx95-62h6-h7v3
No affected components available
Summary
A stored cross-site scripting (XSS) vulnerability was identified in lgsl. The issue arises from improper sanitation of user input. Everyone who accesses this page will be affected by this attack.
Details
The function lgsl_query_40 in lgsl_protocol.php has implemented an HTTP crawler. This function makes a request to the registered game server, and upon crawling the malicious /info endpoint with our payload, will render our javascript on the info page. This information is being displayed via lgsl_details.php
Affected Code:
foreach ($server['e'] as $field => $value) {
$value = preg_replace('/((https*:\/\/|https*:\/\/www\.|www\.)[\w\d\.\-\/=$?]*)/i', "<a href='$1' target='_blank'>$1</a>", html_entity_decode($value));
$output .= "
<tr><td> {$field} </td><td> {$value} </td></tr>";
}
PoC
-
Create a game server with type
ecoand set the target host and port accordingly to your ttack server. I have crafted this json payload that is being parsed according to the schema and being served on/info -
Serve the following JSON payload at
/infoon your handler
{
"Animals": "1",
"EconomyDesc": "<img src=x onerror=prompt(1)>"
}
- Access the corresponding server info page at
/s?=. Upon refreshing & crawling our server, it should execute our javascript.
Measures severity based on intrinsic characteristics of the vulnerability, independent of environment.
No exploitation activity has been observed at this time. Continue routine monitoring.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard