Summary
The GLPI Fields plugin before version 1.23.3 allows users with permission to create dropdowns to inject and execute arbitrary PHP code.
When dropdown content is not properly validated or constrained, an attacker with dropdown creation rights can turn a configuration feature into a remote code execution primitive on the GLPI server.
Affected context
This vulnerability affects GLPI installations that use the Fields plugin with versions prior to 1.23.3 and delegate permissions to users to create or manage custom dropdown fields.
The issue arises in environments where dropdown definitions or their associated configuration values can contain PHP-relevant payloads that are later interpreted or executed by the server-side PHP engine.
It is most relevant in multi-tenant or delegated-administration setups where non-administrator users can define or modify dropdowns.
Exploit preconditions
- Attack surface: GLPI web interface, specifically the Fields plugin dropdown creation or configuration functionality.
- Required access: Valid authenticated user account with permissions to create or manage dropdowns in the Fields plugin.
- Trigger point: The vulnerable code path that processes or renders dropdown definitions in a way that is interpreted as PHP code (e.g., dynamic inclusion, evaluation, or templating).
- Why exploitation is possible: User-controlled dropdown content is insufficiently validated and is later used in a PHP execution context without enforcing strict data-only semantics.
Why this happens
The underlying bug class maps to CWE-20: Improper Input Validation.
The Fields plugin treats dropdown configuration values as trusted input and does not sufficiently validate or sanitize them before using them in a context where PHP code can be interpreted.
Instead of constraining dropdown data to simple, encoded text or well-defined identifiers, the plugin allows user-supplied data to flow into dynamic PHP handling (such as evaluation, inclusion, or dynamic code paths).
This breaks the expected separation between configuration data and executable logic, allowing crafted dropdown definitions to influence program execution.
Potential impact
- Execution of arbitrary PHP code in the context of the GLPI web server process.
- Full compromise of the GLPI application, including reading or modifying tickets, assets, and configuration data.
- Theft or modification of sensitive information stored in the GLPI database.
- Lateral movement within the hosting environment, depending on the web server's privileges and network reachability.
- Installation of backdoors or web shells to maintain persistent access.
General mitigation guidance
Effective mitigation focuses on enforcing strict data/logic separation and hardening how user-controlled configuration is handled:
- Treat all dropdown definitions and custom field configurations as untrusted data, even from authenticated users with elevated functional roles.
- Restrict dropdown content to simple scalar values (e.g., strings, integers) and reject or encode any content that could be interpreted as PHP syntax, paths, or dynamic expressions.
- Avoid using user-controlled values in dynamic PHP execution constructs such as
eval, dynamicinclude/require, or indirect function calls. - Apply centralized validation routines to all configuration inputs related to custom fields and dropdowns, enforcing length limits, character whitelists, and type constraints.
- Run the GLPI application under a minimally privileged account and apply defense-in-depth controls such as filesystem permissions and restricted outbound connectivity to limit damage if similar issues arise.
How teams detect issues like this
Detection efforts can combine code-centric and operational approaches:
- Use static analysis rules or code review checklists to flag flows where user-controllable configuration (dropdown labels, values, or templates) is passed into dynamic PHP constructs or templating engines without proper encoding.
- During manual review, pay attention to plugin code that:
- Builds PHP code snippets or file paths from configuration values.
- Uses
eval, variable functions, dynamic includes, or reflection on data derived from dropdowns. - Implement application-level logging that records the creation and modification of dropdowns and custom fields, with periodic review for anomalous or code-like entries.
- Integrate automated security testing into CI (e.g., SAST tools for PHP, or policy checks specifically targeting improper input validation in plugins) to catch similar insecure patterns early.

