Skip to main content
Vulnerability Database/CVE-2024-23645

CVE-2024-23645: GLPI Asset Management XSS Vulnerability

CVE-2024-23645 is a cross-site scripting vulnerability in GLPI Asset Management Software that allows attackers to execute malicious scripts through crafted URLs on reports pages. This post explains its impact, technical details, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-23645 Overview

CVE-2024-23645 is a reflected cross-site scripting (XSS) vulnerability [CWE-79] affecting GLPI, an open-source Asset and IT Management Software package maintained by the GLPI Project. The flaw resides in the statistics and reports pages, where unsanitized query parameters are reflected into generated links and forms. An attacker who tricks an authenticated user into visiting a crafted URL can execute arbitrary JavaScript in the victim's browser session. The issue is addressed in GLPI version 10.0.12.

Critical Impact

A malicious URL targeting GLPI reports pages can execute attacker-controlled script in the context of an authenticated user, enabling session abuse and unauthorized actions within the GLPI interface.

Affected Products

  • GLPI Project — GLPI versions prior to 10.0.12
  • Deployments exposing the front/stat.location.php, front/stat.tracking.php, front/stat.global.php, and front/stat.graph.php endpoints
  • Self-hosted GLPI instances reachable over the network to authenticated users

Discovery Timeline

  • 2024-02-01 - CVE-2024-23645 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-23645

Vulnerability Analysis

The vulnerability is a reflected XSS flaw in GLPI's statistics module. Several report endpoints build HTML links and forms by concatenating raw values from $_GET and $_POST directly into output markup. Because the parameters bypass encoding and type validation, an attacker can inject HTML or JavaScript through parameters such as date1, date2, itemtype, type, showgraph, dropdown, and value2.

When a logged-in user follows a crafted link, the injected script runs under the GLPI origin. The attacker can read session data, perform actions as the victim, or pivot to other GLPI functionality the user is authorized to access. Exploitation requires user interaction but no privileges on the attacker's side.

Root Cause

The root cause is improper neutralization of input during web page generation [CWE-79]. GLPI's statistics scripts concatenated query values into HTML strings using the ampersand-encoded & separator but never encoded the parameter values themselves, and never validated that date parameters matched the expected YYYY-MM-DD format.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker crafts a URL to a GLPI reports endpoint containing a payload within a vulnerable parameter and delivers it through phishing, chat, or an attacker-controlled site. When the authenticated victim loads the URL, the payload is reflected into the DOM and executed.

php
// Patch excerpt — front/stat.tracking.php
// Before: raw concatenation of $_GET values into the link string
-    "date1=" . $_GET["date1"] . "&date2=" . $_GET["date2"] . "&type=" . $_GET["type"] .
-                    "&showgraph=" . $_GET["showgraph"] . "&itemtype=" . $_GET["itemtype"] .
-                    "&value2=" . $_GET['value2'],
// After: parameters are passed through Toolbox::append_params for encoding
+    Toolbox::append_params(
+        [
+            'date1'     => $_GET['date1'],
+            'date2'     => $_GET['date2'],
+            'type'      => $_GET['type'],
+            'showgraph' => $_GET['showgraph'],
+            'itemtype'  => $_GET['itemtype'],
+            'value2'    => $_GET['value2'],
+        ],
+        '&'
+    ),
// Source: https://github.com/glpi-project/glpi/commit/6cf265936c4f6edf7dea7c78b12e46d75b94d9b0

A companion patch adds strict date validation in front/stat.global.php and front/stat.graph.php, dropping any date1 or date2 value that does not match the regular expression /\d{4}-\d{2}-\d{2}/. See the GitHub commit for stat.graph.php and stat.global.php.

Detection Methods for CVE-2024-23645

Indicators of Compromise

  • Web server access logs showing requests to /front/stat.location.php, /front/stat.tracking.php, /front/stat.global.php, or /front/stat.graph.php with HTML special characters (<, >, ", ') in query parameters.
  • Requests where date1 or date2 parameters do not match the YYYY-MM-DD format.
  • Referer headers pointing to untrusted external domains for sessions interacting with GLPI reports.

Detection Strategies

  • Deploy web application firewall (WAF) rules that flag reflected XSS payloads in query strings targeting GLPI statistics endpoints.
  • Alert on GLPI session activity immediately following requests containing suspicious URL-encoded script fragments such as %3Cscript, onerror=, or javascript:.
  • Correlate browser Content Security Policy (CSP) violation reports with GLPI reports page URLs.

Monitoring Recommendations

  • Monitor the GLPI release channel and apply the fixed version 10.0.12 across staging and production.
  • Track outbound traffic from GLPI user workstations to unexpected domains that could indicate stolen session data.
  • Audit GLPI user action logs for privileged changes performed shortly after a reports page request to detect post-exploitation activity.

How to Mitigate CVE-2024-23645

Immediate Actions Required

Patch Information

The vendor-published fixes are in commits 6cf26593 and fc1f6da9. They introduce Toolbox::append_params() for safe parameter encoding and enforce strict date format validation on date1 and date2 inputs.

Workarounds

  • Restrict access to GLPI statistics endpoints at the reverse proxy or WAF layer until the upgrade is deployed.
  • Enforce a strict Content Security Policy that disallows inline script execution for the GLPI origin.
  • Train administrative users to avoid clicking GLPI URLs received from untrusted sources.
bash
# Example nginx rule blocking suspicious characters on GLPI stats endpoints
location ~ ^/front/stat\.(location|tracking|global|graph)\.php$ {
    if ($args ~* "(<|>|script|javascript:|onerror=)") {
        return 403;
    }
    proxy_pass http://glpi_backend;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.