GitHub Advisoryadvisory · Packagist

GHSA-xx95-62h6-h7v3 lgsl Stored Cross-Site Scripting vulnerability

HIGH Published 2024-12-26 Modified 2024-12-27 Official page ↗
Aliases
CVE-2024-56361
Ecosystem
Packagist
Packages
tltneon/lgsl
Severity
High
Weaknesses
CWE-79
Reviewed
2024-12-26

Affected packages

• Packagist tltneon/lgsl: < 7.0.0 → fixed in 7.0.0

Description

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: ```php foreach ($server['e'] as $field => $value) { $value = preg_replace('/((https*:\/\/|https*:\/\/www\.|www\.)[\w\d\.\-\/=$?​]*)/i', "$1", html_entity_decode($value)); $output .= " {$field} {$value} "; } ``` PoC 1. Create a game server with type `eco` and 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` 2. Serve the following JSON payload at `/info` on your handler ```json { "Animals": "1", "EconomyDesc": "" } ``` 3. Access the corresponding server info page at `/s?=`. Upon refreshing & crawling our server, it should execute our javascript.

Related

Alias · CVE (1)

  • CVE-2024-56361 LGSL (Live Game Server List) provides online status for games. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References