Skip to main content
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

GLPI htmLawedTest.php PHP Code Injection

IdentifiersCVE-2022-35914CWE-94

CVE-2022-35914 is a PHP code injection vulnerability in the htmlawed module bundled with GLPI through version 10.0.2. The issue is present in /vendor/htmlawed/htmlawed/htmLawedTest.php, a test page that should not be exposed in production. According to the provided content, an attacker can abuse this endpoint to inject and execute PHP code, resulting in remote command execution on the underlying server. The available context specifically identifies htmLawedTest.php as the vulnerable component and describes successful exploitation by sending crafted input to the page and achieving command execution.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows remote execution of attacker-controlled PHP code in the context of the web server process. This can lead to full compromise of the GLPI application, arbitrary command execution on the host, deployment of malware or botnet payloads, theft or modification of application data, and use of the server as an initial access point for further intrusion activity.

Mitigation

If you can’t patch tonight, do this now.

Restrict external access to the GLPI instance and specifically block requests to /vendor/htmlawed/htmlawed/htmLawedTest.php or any equivalent exposed htmLawed test page at the web server, reverse proxy, or WAF layer. Remove or disable unused test/debug functionality, monitor for requests to htmLawedTest.php, and inspect systems for signs of post-exploitation if the endpoint has been internet-accessible. Network segmentation and limiting the privileges of the web server account can reduce impact if exploitation occurs.

Remediation

Patch, then assume compromise.

Upgrade GLPI to a version that addresses CVE-2022-35914. Because the vulnerable component is the exposed /vendor/htmlawed/htmlawed/htmLawedTest.php test file in GLPI through 10.0.2, remediation should include applying the vendor fix and ensuring that development or test files are not deployed or exposed in production environments. If an immediate upgrade is not possible, remove the vulnerable htmLawedTest.php file from the deployment if it is not required.
PUBLIC EXPLOITS

Exploits

3 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 3 / 4 TOTALView more in app
CVE-2022-35914_pocMaturityPoCVerified exploit

This repository contains a Python proof-of-concept exploit for CVE-2022-35914, a remote code execution vulnerability in GLPI. The main file, CVE-2022-35914.py, is a command-line tool that targets the /vendor/htmlawed/htmlawed/htmLawedTest.php endpoint of a vulnerable GLPI installation. By sending crafted POST requests, the script exploits improper input handling to execute arbitrary system commands on the server using PHP's call_user_func, array_map, and passthru functions. The exploit can be used to check for vulnerability or to execute arbitrary commands, with the output displayed to the user. The repository also includes a README.md with usage instructions and references, and a requirements.txt listing Python dependencies (beautifulsoup4, requests, argparse). The exploit is operational and provides direct command execution on the target if successful.

noxlumensDisclosed Aug 25, 2024pythonnetwork
CVE-2022-35914MaturityPoCVerified exploit

This repository provides a Python proof-of-concept exploit for CVE-2022-35914, a command injection vulnerability in GLPI via the /vendor/htmlawed/htmlawed/htmLawedTest.php script. The main file, CVE-2022-35914.py, takes a target URL and an optional command to execute (default: 'id'). It first checks if the endpoint is accessible and appears to be the expected htmLawed test page, then crafts a POST request to exploit the vulnerability, allowing arbitrary command execution as the web server user. The exploit can be used for basic command execution or to obtain a reverse shell, as demonstrated in the README. The code is operational and can be used directly against vulnerable GLPI instances. The only fingerprintable endpoint is the htmLawedTest.php script, which must be accessible on the target. The repository also includes a README with usage instructions and a requirements.txt for dependencies.

senderendDisclosed Apr 24, 2024pythonnetwork
CVE-2022-35914-pocMaturityPoCVerified exploit

This repository provides a Python proof-of-concept exploit for CVE-2022-35914, a command injection vulnerability in GLPI via the third-party htmLawedTest.php script. The main file, CVE-2022-35914.py, is a command-line tool that takes a target URL and an optional command to execute (defaulting to 'id'). It first checks if the vulnerable script is accessible and appears to be the correct htmLawed test page, then performs a POST request to inject and execute the specified command on the server. The output of the command is parsed from the server's response and displayed to the user. The exploit requires the target to be running a vulnerable version of GLPI with the htmLawedTest.php script exposed. The repository also includes a README with usage instructions and a requirements.txt listing Python dependencies (beautifulsoup4, requests, argparse). The main attack vector is network-based, targeting the HTTP endpoint /vendor/htmlawed/htmlawed/htmLawedTest.php on the GLPI server.

cosad3sDisclosed Sep 30, 2022pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Glpi-ProjectGlpiapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware4

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.