tltneon/lgsl · Security
LGSL has a reflected XSS at /lgsl_files/lgsl_list.php
- GHSA ID
- GHSA-ggwq-xc72-33r3
- CVE ID
- CVE-2024-56517
- Severity
- medium
- Published
- Updated
- CVSS v4
- 5.3 · 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
Description
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. 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
$uri = $_SERVER['REQUEST_URI'];
if ($lgsl_config['preloader']) {
$uri = $_SERVER['HTTP_REFERER'];
}
Proof of Concept:
- Capture a request to the path
/lgsl_files/lgsl_list.php. - Inject the following payload into the Referer header:
test'><script>alert(1)</script><. - Send the request.
- The XSS payload is triggered when reloading.
Impact:
Execution of Malicious Code
CWEs
- CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
- https://github.com/tltneon/lgsl/security/advisories/GHSA-ggwq-xc72-33r3 ↗
- https://github.com/tltneon/lgsl/commit/7ecb839df9358d21f64cdbff5b2536af25a77de1 ↗
- https://nvd.nist.gov/vuln/detail/CVE-2024-56517 ↗
- https://github.com/tltneon/lgsl/blob/master/lgsl_files/lgsl_list.php#L20-L24 ↗
- https://github.com/advisories/GHSA-ggwq-xc72-33r3 ↗