| Titel | SourceCodester E-Commerce Website 1.0 SQL Injection |
|---|
| Beschreibung |
SQL Injection vulnerability was discovered in Sourcecodester's Online Computer and Laptop Store. (user registration)
Official Website: https://www.sourcecodester.com/php/16397/online-computer-and-laptop-store-using-php-and-mysql-source-code-free-download.html
Version: 1.0
Related Code file: /php-ocls/classes/Master.php
The email variable is directly inserted into the SQL query without any escaping or parameterization. An attacker could inject malicious SQL code by manipulating the email field. in (line number 390 of Master.php)
The email is directly inserted into the SQL query without escaping or validation:
Line 379: $check = $this->conn->query("SELECT * FROM `clients` where `email` = '{$email}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
If a malicious user injects SQL code into the email or id parameters, they can manipulate the query.
Injection parameter: email
Step to Reproduce:
1. Install and Setup the Online Computer Store.
2. click of Login or follow this path (http://192.168.192.128/php-ocls/login) Click on **Login** now click on **Create Account**
4. Fill the form and intercept the **POST** request in burp and copy the request
5. Store this request in a .txt file eg: register_req.txt
6. Run sqlmap
`sqlmap -r register_req.txt -p email`
Observe the SQL injection
|
|---|
| Quelle | ⚠️ https://github.com/gurudattch/CVEs/blob/main/SourceCodester-Online-Computer-Laptop-Shop-SQLi-poc.md |
|---|
| Benutzer | guru (UID 74056) |
|---|
| Einreichung | 30.08.2024 17:53 (vor 2 Jahren) |
|---|
| Moderieren | 30.08.2024 18:05 (12 minutes later) |
|---|
| Status | Duplikat |
|---|
| VulDB Eintrag | 241254 [SourceCodester Online Computer and Laptop Store 1.0 Master.php register email SQL Injection] |
|---|
| Punkte | 0 |
|---|