CVE-2024-56361: lgsl Stored Cross-Site Scripting Vulnerability

tltneon/lgsl Updated 02 Oct 2025

Summary

26/12/2024
Yes i
High
Not published

CVE-2024-56361: lgsl Stored Cross-Site Scripting vulnerability. Affects tltneon/lgsl versions < 7.0.0. Fixed in 7.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

lgsl is an open-source library designed to facilitate the querying and display of game server information. It allows users to retrieve and present data from various game servers in a structured format. The library is widely used in gaming communities for its ability to provide real-time server status and details. However, it has a critical vulnerability that stems from improper input sanitation, making it susceptible to stored cross-site scripting (XSS) attacks.

Vulnerability Detail

The vulnerability arises from the function lgsl_query_40 in lgsl_protocol.php, which implements an HTTP crawler to request data from registered game servers. When a malicious payload is crawled from the /info endpoint, it can execute arbitrary JavaScript on the info page viewed by users. This can lead to unauthorized actions being performed on behalf of users, data theft, or session hijacking. The vulnerability is classified as a stored XSS, meaning the malicious script is stored on the server and executed when users access the affected page.

How To Fix

Minimum fixed version

7.0.0

This is the first release that contains the fix.

composer require tltneon/lgsl:7.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement input validation and output encoding on the data retrieved from game servers before displaying it. For example, you can modify the affected code to ensure that any user input is properly sanitized before being rendered on the page. Here’s an example of how to encode output safely:

foreach ($server['e'] as $field => $value) {
    $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); // Sanitize output
    $output .= "<tr><td> {$field} </td><td> {$value} </td></tr>";
}

Conclusion

The lgsl package has a critical stored XSS vulnerability (CVE-2024-56361) due to improper input sanitation. It is essential to update to version 7.0.0 or later to mitigate this risk. Implementing temporary workarounds can help protect users until the update is applied.

See every vulnerability recorded for tltneon/lgsl →

Share this vulnerability

FAQ

Stored XSS is a type of security vulnerability where an attacker can inject malicious scripts into content that is stored on a server. When users access the affected content, the script executes in their browsers, potentially compromising their data.

You can use Vulert, a tool that monitors open-source vulnerabilities in your software. By analyzing your composer.lock file, Vulert can alert you to any vulnerabilities, including CVE-2024-56361. You can also check your application using the Vulert playground without signing up.

If exploited, this vulnerability can lead to unauthorized actions on behalf of users, data theft, session hijacking, and a compromised user experience, potentially damaging the reputation of the application.

Yes, you can implement input validation and output encoding as a temporary measure to mitigate the risk until you can update to the patched version.

Detailed information about CVE-2024-56361 can be found on security advisory databases, GitHub advisories, and the official documentation of the lgsl package.

Related vulnerabilities

Recent vulnerabilities recorded for tltneon/lgsl.

How To Fix

Minimum fixed version

7.0.0

This is the first release that contains the fix.

composer require tltneon/lgsl:7.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback