lgsl Stored Cross-Site Scripting vulnerability
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | tltneon/lgsl | < 7.0.0 | 7.0.0 |
References
- Weakness (CWE)
CWE-79- Platform
- Composer
- Package
tltneon/lgsl- Disclosed
- 26.12.2024
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-xx95-62h6-h7v3 - CC BY 4.0
Vulnerability history: tltneon/lgsl
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 12.2024 12.2024
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 1
Disclosures per year
- 2024: 2
- 2025: 0
- 2026: 0
-
lgsl Stored Cross-Site Scripting vulnerability this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.