SourceCodester Online Eyewear Shop 1.0 POST Request oews/classes/Users.php registration firstname/middlename/lastname/email/contact cross site scripting
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.3 | $0-$5k | 0.00 |
Summary
A vulnerability identified as problematic has been detected in SourceCodester Online Eyewear Shop 1.0. The affected element is the function registration of the file oews/classes/Users.php of the component POST Request Handler. This manipulation of the argument firstname/middlename/lastname/email/contact causes cross site scripting.
The identification of this vulnerability is CVE-2023-0732. It is possible to initiate the attack remotely. Furthermore, there is an exploit available.
Details
A vulnerability has been found in SourceCodester Online Eyewear Shop 1.0 and classified as problematic. Affected by this vulnerability is the function registration of the file oews/classes/Users.php of the component POST Request Handler. The manipulation of the argument firstname/middlename/lastname/email/contact with an unknown input leads to a cross site scripting vulnerability. The CWE definition for the vulnerability is CWE-79. The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. As an impact it is known to affect integrity.
The weakness was shared 02/07/2023 by Pierfrancesco Conti with Cyber Partners. This vulnerability is known as CVE-2023-0732. It demands that the victim is doing some kind of user interaction. Technical details and also a exploit are known. MITRE ATT&CK project uses the attack technique T1059.007 for this issue. Responsible for the vulnerability is the following code:
function registration(){
if(!empty($_POST['password']))
$_POST['password'] = md5($_POST['password']);
else
unset($_POST['password']);
extract($_POST);
$main_field = ['firstname', 'middlename', 'lastname', 'gender', 'contact', 'email', 'status', 'password'];
$data = "";
$check = $this->conn->query("SELECT * FROM `customer_list` where email = '{$email}' ".($id > 0 ? " and id!='{$id}'" : "")." ")->num_rows;
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = 'Email already exists.';
return json_encode($resp);
}
foreach($_POST as $k => $v){
$v = $this->conn->real_escape_string($v);
if(in_array($k, $main_field)){
if(!empty($data)) $data .= ", ";
$data .= " `{$k}` = '{$v}' ";
}
}
if(empty($id)){
$sql = "INSERT INTO `customer_list` set {$data} ";
}else{
$sql = "UPDATE `customer_list` set {$data} where id = '{$id}' ";
}
$save = $this->conn->query($sql);
if($save){
$uid = !empty($id) ? $id : $this->conn->insert_id;
$resp['status'] = 'success';
$resp['uid'] = $uid;
if(!empty($id))
$resp['msg'] = 'User Details has been updated successfully';
else
$resp['msg'] = 'Your Account has been created successfully';
if(!empty($_FILES['img']['tmp_name'])){
if(!is_dir(base_app."uploads/customers"))
mkdir(base_app."uploads/customers");
$ext = pathinfo($_FILES['img']['name'], PATHINFO_EXTENSION);
$fname = "uploads/customers/$uid.png";
$accept = array('image/jpeg','image/png');
if(!in_array($_FILES['img']['type'],$accept)){
$resp['msg'] = "Image file type is invalid";
}
if($_FILES['img']['type'] == 'image/jpeg')
$uploadfile = imagecreatefromjpeg($_FILES['img']['tmp_name']);
elseif($_FILES['img']['type'] == 'image/png')
$uploadfile = imagecreatefrompng($_FILES['img']['tmp_name']);
if(!$uploadfile){
$resp['msg'] = "Image is invalid";
}
$temp = imagescale($uploadfile,200,200);
if(is_file(base_app.$fname))
unlink(base_app.$fname);
$upload =imagepng($temp,base_app.$fname);
if($upload){
$this->conn->query("UPDATE `customer_list` set `avatar` = CONCAT('{$fname}', '?v=',unix_timestamp(CURRENT_TIMESTAMP)) where id = '{$uid}'");
}
imagedestroy($temp);
}
if(!empty($uid) && $this->settings->userdata('login_type') != 1){
$user = $this->conn->query("SELECT * FROM `customer_list` where id = '{$uid}' ");
if($user->num_rows > 0){
$res = $user->fetch_array();
foreach($res as $k => $v){
if(!is_numeric($k) && $k != 'password'){
$this->settings->set_userdata($k, $v);
}
}
$this->settings->set_userdata('login_type', '2');
}
}
}else{
$resp['status'] = 'failed';
$resp['msg'] = $this->conn->error;
$resp['sql'] = $sql;
}
if($resp['status'] == 'success' && isset($resp['msg']))
$this->settings->set_flashdata('success', $resp['msg']);
return json_encode($resp);
}It is declared as proof-of-concept. By approaching the search of inurl:oews/classes/Users.php it is possible to find vulnerable targets with Google Hacking.
There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Product
Vendor
Name
Version
License
Website
- Vendor: https://www.sourcecodester.com/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.5VulDB Meta Temp Score: 5.3
VulDB Base Score: 3.5
VulDB Temp Score: 3.2
VulDB Vector: 🔍
VulDB Reliability: 🔍
Researcher Base Score: 9.0
Researcher Vector: 🔍
NVD Base Score: 6.1
NVD Vector: 🔍
CNA Base Score: 3.5
CNA Vector (VulDB): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Researcher Base Score: 🔍
NVD Base Score: 🔍
Exploiting
Class: Cross site scriptingCWE: CWE-79 / CWE-94 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Proof-of-Concept
Google Hack: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: no mitigation knownStatus: 🔍
0-Day Time: 🔍
Timeline
02/07/2023 🔍02/07/2023 🔍
02/07/2023 🔍
04/27/2025 🔍
Sources
Vendor: sourcecodester.comResearcher: Pierfrancesco Conti
Organization: Cyber Partners
Status: Not defined
CVE: CVE-2023-0732 (🔍)
GCVE (CVE): GCVE-0-2023-0732
GCVE (VulDB): GCVE-100-220369
scip Labs: https://www.scip.ch/en/?labs.20161013
Entry
Created: 02/07/2023 21:04Updated: 04/27/2025 23:54
Changes: 02/07/2023 21:04 (39), 02/08/2023 14:11 (8), 02/08/2023 14:12 (15), 02/08/2023 14:15 (4), 03/06/2023 11:01 (2), 03/06/2023 11:07 (28), 09/07/2024 16:10 (22), 04/27/2025 23:54 (3)
Complete: 🔍
Submitter: CP_offensive_team
Committer: CP_offensive_team
Cache ID: 216::103
Submit
Accepted
- Submit #85725: SourceCodester Online Eyewear Shop 1.0 Cross-Site Scripting (by CP_offensive_team)
Duplicate
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
No comments yet. Languages: en.
Please log in to comment.