Summary
A stored cross-site scripting vulnerability in GLPI's inventory endpoint allows unauthenticated users to inject persistent JavaScript payloads into the application.
When other users later view affected inventory data in the web interface, the payload may execute in their browser, potentially leading to session hijacking, data exfiltration, or unauthorized actions.
Affected context
This issue affects GLPI deployments from version 11.0.0 up to but not including 11.0.6, specifically within the inventory-related functionality exposed over HTTP.
The vulnerable context involves data submitted to the inventory endpoint that is later rendered in the GLPI web interface without robust output encoding.
The problem is most relevant where inventory submissions are reachable from untrusted sources (e.g., unauthenticated endpoints, agents, or integrations) and where users with valid GLPI accounts routinely view or manage inventory data.
Exploit preconditions
- Attack surface: Public or internal GLPI HTTP interface, specifically the inventory endpoint.
- Required access: No prior authentication; the attacker only needs network access to reach the inventory endpoint.
- Trigger point: Submission of crafted inventory data containing XSS payloads, which are later displayed in GLPI pages viewed by authenticated users.
- Why exploitation is possible: User-supplied inventory fields are stored and subsequently rendered in the browser without sufficient context-aware output encoding or sanitization, allowing attacker-controlled JavaScript to execute in the victim's session.
Why this happens
The root cause maps primarily to CWE-79: Improper Neutralization of Input During Web Page Generation (XSS).
Inventory data accepted from unauthenticated sources is treated as displayable content and persisted without enforcing strict neutralization of HTML/JavaScript metacharacters.
When this stored data is later included in dynamically generated web pages, the application fails to perform robust, context-aware output encoding, enabling execution of injected script content.
This behavior is reinforced by weaker output handling (CWE-116: Improper Encoding or Escaping of Output) and the exposure of sensitive functionality to unauthenticated sources (CWE-306: Missing Authentication for Critical Function), making the injection trivially reachable.
Potential impact
- Execution of arbitrary JavaScript in the browser of users viewing affected inventory pages
- Hijacking of active GLPI user sessions and impersonation of those users
- Unauthorized actions performed in GLPI with the victim's privileges (e.g., altering assets, tickets, or configurations)
- Theft or modification of sensitive data displayed in or accessible from the GLPI interface
- Use of the GLPI interface as a pivot point to deliver further client-side attacks (e.g., phishing within the application)
General mitigation guidance
Effective mitigation focuses on treating all inventory data as untrusted and ensuring it cannot be interpreted as executable code by the browser.
Common defensive patterns include:
- Applying strict, context-aware output encoding on all data rendered in HTML, attributes, JavaScript, and URLs.
- Restricting the characters and formats accepted for inventory fields through whitelisting validation, especially for fields that are typically textual or structured.
- Separating untrusted content from executable contexts, for example by rendering user content as plain text rather than HTML wherever possible.
- Using templating frameworks or view helpers that encode by default and discourage raw HTML rendering.
- Applying principle of least privilege in the UI so that highly privileged actions are exposed minimally, limiting the damage if a script executes.
- Considering security headers such as Content Security Policy (CSP) as a defense-in-depth layer to reduce the impact of injected scripts.
How teams detect issues like this
Potential detection and verification approaches include:
- Static analysis rules that flag direct insertion of request or database fields into HTML without passing through encoding or sanitization routines.
- Code review checklists that explicitly ask reviewers to confirm:
- No raw echoing of user-controlled inventory fields into templates.
- Use of safe escaping helpers for all dynamic template variables.
- Dynamic application security testing (DAST) that submits representative XSS probes through inventory-related parameters and checks if they are stored and later executed.
- Logging and monitoring for unusual or malformed inventory submissions (e.g., presence of HTML tags, script keywords) as indicators of probing attempts.
- Integrating automated security scanning tools into CI/CD that understand XSS patterns and can flag risky changes in rendering logic.

