CVE-2024-56517: Tltneon/lgsl Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-ggwq-xc72-33r3
CWE-79
Published
Advisory Summary

CVE-2024-56517 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Tltneon/lgsl libraries in the Packagist ecosystem. The issue involves lgsl has a reflected xss at /lgsl_files/lgsl_list.php. Remediation is available in the latest vendor maintenance releases.

CVE-2024-56517 at a Glance

CVE Identifier CVE-2024-56517
GHSA Identifier GHSA-ggwq-xc72-33r3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Tltneon/lgsl
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2024-56517

To remediate this vulnerability, upgrade all affected Tltneon/lgsl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tltneon/lgsl fixed: Latest secure release
Upgrade tltneon/lgsl to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for tltneon/lgsl

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-56517, inspect your project dependencies for Tltneon/lgsl:

inspect dependencies for tltneon/lgsl

Analyze the terminal output to locate any version of Tltneon/lgsl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Tltneon/lgsl, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Reflected XSS at /lgsl_files/lgsl_list.php **Description:** Vulnerability: A reflected XSS vulnerability exists in the `Referer` HTTP header of [LGSL v6.2.1](https://github.com/tltneon/lgsl/releases/tag/v6.2.1). The vulnerability allows attackers to inject arbitrary JavaScript code, which is reflected in the HTML response without proper sanitization. When crafted malicious input is provided in the `Referer` header, it is echoed back into an HTML attribute in the application’s response. The vulnerability is present at [Line 20-24](https://github.com/tltneon/lgsl/blob/master/lgsl_files/lgsl_list.php#L20-L24) ```php $uri = $_SERVER['REQUEST_URI']; if ($lgsl_config['preloader']) { $uri = $_SERVER['HTTP_REFERER']; } ``` **Proof of Concept:** 1. Capture a request to the path `/lgsl_files/lgsl_list.php`. 2. Inject the following payload into the Referer header: `test'><script>alert(1)</script><`. 3. Send the request. 4. The XSS payload is triggered when reloading. ![image](https://github.com/user-attachments/assets/467a6c60-db45-4520-9918-59dff819b384) ![image](https://github.com/user-attachments/assets/c537c59e-38c2-47f0-97d8-54ee1b2018b8) **Impact:** Execution of Malicious Code

CVE-2024-56517 Affected Tltneon/lgsl Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
tltneon/lgsl
Packagist
≤ 6.2.1

References

Frequently Asked Questions

What is CVE-2024-56517?
CVE-2024-56517 is a security vulnerability in Tltneon/lgsl involving LGSL has a reflected XSS at /lgsl_files/lgsl_list.php under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Tltneon/lgsl versions are affected?
Affected versions include releases prior to current release patches across affected packages: tltneon/lgsl.
What version fixes CVE-2024-56517?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is tltneon/lgsl affected?
Yes, tltneon/lgsl is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-56517?
CVE-2024-56517 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2024-56517?
Run the dependency tree command: 'inspect dependencies for tltneon/lgsl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ggwq-xc72-33r3",
  "modified" : "2024-12-30T18:44:58Z",
  "published" : "2024-12-30T16:49:28Z",
  "aliases" : [ "CVE-2024-56517" ],
  "summary" : "LGSL has a reflected XSS at /lgsl_files/lgsl_list.php",
  "details" : "# Reflected XSS at /lgsl_files/lgsl_list.php\n\n\n**Description:**\n\nVulnerability: A reflected XSS vulnerability exists in the `Referer` HTTP header of [LGSL v6.2.1](https://github.com/tltneon/lgsl/releases/tag/v6.2.1). The vulnerability allows attackers to inject arbitrary JavaScript code, which is reflected in the HTML response without proper sanitization.\nWhen crafted malicious input is provided in the `Referer` header, it is echoed back into an HTML attribute in the application’s response.\n\n\nThe vulnerability is present at [Line 20-24](https://github.com/tltneon/lgsl/blob/master/lgsl_files/lgsl_list.php#L20-L24)\n```php\n  $uri = $_SERVER['REQUEST_URI'];\n\n  if ($lgsl_config['preloader']) {\n    $uri = $_SERVER['HTTP_REFERER'];\n  }\n```\n\n**Proof of Concept:**\n1. Capture a request to the path `/lgsl_files/lgsl_list.php`.\n2. Inject the following payload into the Referer header: `test'><script>alert(1)</script><`.\n3. Send the request.\n4. The XSS payload is triggered when reloading.\n![image](https://github.com/user-attachments/assets/467a6c60-db45-4520-9918-59dff819b384)\n![image](https://github.com/user-attachments/assets/c537c59e-38c2-47f0-97d8-54ee1b2018b8)\n\n\n\n**Impact:**\n\nExecution of Malicious Code\n\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "tltneon/lgsl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "6.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tltneon/lgsl/security/advisories/GHSA-ggwq-xc72-33r3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56517"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tltneon/lgsl/commit/7ecb839df9358d21f64cdbff5b2536af25a77de1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tltneon/lgsl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tltneon/lgsl/blob/master/lgsl_files/lgsl_list.php#L20-L24"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-30T16:49:28Z",
    "nvd_published_at" : "2024-12-30T17:15:09Z"
  }
}