Summary
A SQL injection vulnerability in the GLPI inventory endpoint allows an unauthenticated attacker to inject arbitrary SQL into backend queries.
When untrusted input is concatenated into SQL statements without proper validation and parameterization, an attacker can manipulate database operations, potentially leading to data exposure or modification.
Affected context
This issue affects GLPI instances running versions from 11.0.0 up to (but not including) 11.0.3 where the inventory endpoint is exposed.
The vulnerability arises when incoming inventory-related parameters are processed into SQL queries without robust input handling or parameter binding.
Environments where the inventory functionality is accessible to unauthenticated users over a network are most at risk, especially when the GLPI database contains sensitive IT asset or user information.
Exploit preconditions
- Attack surface: Public- or internally-exposed GLPI HTTP(S) interface, specifically the inventory endpoint.
- Required access: No authentication is required; the endpoint is reachable anonymously.
- Trigger point: Submission of crafted parameters or payloads to the inventory endpoint that are incorporated into SQL queries.
- Why exploitation is possible: User-controlled data is embedded into SQL statements without consistent use of parameterized queries or strict input validation, allowing attackers to alter query structure.
Why this happens
The root cause maps directly to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
The inventory endpoint constructs SQL queries using request parameters that are not sufficiently sanitized or bound as parameters, allowing control characters such as quotes, operators, or comment markers to change the intended query logic.
Conceptually, this is an insecure pattern where application code dynamically builds SQL strings from user input instead of relying on prepared statements and strict query templates.
Potential impact
- An attacker may read data they are not authorized to access, including asset or configuration information.
- An attacker may modify, insert, or delete inventory-related records in the database.
- An attacker could potentially impact application behavior by manipulating query conditions and result sets.
- In certain environments, SQL injection could be chained with other weaknesses to escalate privileges or pivot to additional systems.
General mitigation guidance
Mitigation focuses on enforcing safe database access patterns and minimizing the trust placed in client-supplied data:
- Prefer parameterized queries or prepared statements for all database interactions, avoiding direct string concatenation with user input.
- Define strict, allowlist-based validation for inventory parameters, limiting them to expected formats, types, and ranges.
- Centralize query-building logic so all endpoints, including inventory-related ones, follow consistent secure patterns.
- Separate application privileges so the database account used by GLPI has only the minimal rights required for normal operations.
- Consider layering defenses such as database-level query controls or web application firewalls configured to detect generic SQL injection patterns.
How teams detect issues like this
Effective detection typically combines code-centric and behavior-centric approaches:
- Use static analysis or linters to flag dynamic SQL string construction and missing parameterization in PHP or other GLPI components.
- Conduct targeted code reviews for endpoints that accept unauthenticated requests, paying particular attention to how request parameters flow into database calls.
- Apply security testing, including automated SQL injection scanning and fuzzing of the inventory endpoint, in staging environments.
- Monitor database logs and application logs for anomalous queries, syntax errors, or patterns indicative of injection attempts, such as unexpected use of comments, unions, or tautological conditions.

