Online Blood Donation Management System v1.0 - Stored Cross-Site Scripting (XSS)

Summary

NameOnline Blood Donation Management System v1.0 - Stored Cross-Site Scripting (XSS)
Code nameCarpenter
ProductOnline Blood Donation Management System
VendorProjectworlds Pvt. Limited
Affected versionsVersion 1.0
StatePublic
Release date2023-10-27

Vulnerabilities

KindStored Cross-Site Scripting (XSS)
Rule010. Stored cross-site scripting
RemoteYes
CVSSv3 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSSv3 Base Score6.1
Exploit availableYes
CVE ID(s)CVE-2023-44484

Description

Online Blood Donation Management System v1.0 is vulnerable to a Stored Cross-Site Scripting vulnerability. The 'firstName' parameter of the users/register.php resource is copied into the users/member.php document as plain text between tags. Any input is echoed unmodified in the users/member.php response. The vulnerable code is:

users/register.php:

$firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $email = $_POST['email']; $dob = $_POST['dob']; $gender = $_POST['gender']; $address = $_POST['address']; $city = $_POST['city']; $mobile = $_POST['mobile']; $bType = $_POST['blood_group']; require_once 'php/DBConnect.php'; $db = new DBConnect(); $flag = $db->registerUser($firstName, $lastName, $email, $dob, $gender, $bType, $address, $city, $mobile);

users/DBConnect.php:

public function registerUser($firstName,$lastName,$email,$dob,$gender,$b_type,$address,$city,$mobile){ $stmt = $this->db->prepare("INSERT INTO users (first_name,last_name,email,dob,gender,b_type,address,city,mobile) VALUES (?,?,?,?,?,?,?,?,?)"); $stmt->execute([$firstName,$lastName,$email,$dob,$gender,$b_type,$address,$city,$mobile]);
    return true;
}

users/member.php:

require_once 'php/DBConnect.php'; $db = new DBConnect(); $users = $db->getUsers(); ... <?php include 'layout/_member_layout.php'; ?>

layout/_member_layout.php:

<?php foreach($users as $u): $i++;?> <tr class="<?php if($i%2==0){echo $bg_background;}else{echo 'bg-danger';} ?>"> <td><?= $u['first_name']." ".$u['last_name']; ?></td> <td><?= $u['email']; ?></td> <td><?= $u['dob']; ?></td> <td><?= $u['gender']; ?></td> <td><?= $u['b_type']; ?></td> <td><?= wordwrap($u['address'], 26, '<br>'); ?></td> <td><?= $u['city']; ?></td> <td><?= $u['mobile']; ?></td> </tr>

Our security policy

We have reserved the ID CVE-2023-44484 to refer to this issue from now on.

System Information

  • Version: Online Blood Donation Management System v1.0
  • Operating System: Any

Mitigation

There is currently no patch available for this vulnerability.

Credits

The vulnerability was discovered by Andres Roldan from Fluid Attacks' Offensive Team.

References

Vendor page https://projectworlds.in/

Timeline

Time-lapse-logo

2023-09-29

Vulnerability discovered.

Time-lapse-logo

2023-09-29

Vendor contacted.

Time-lapse-logo

2023-10-27

Public Disclosure.

Fluid Logo Footer

Hacking software for over 20 years

Fluid Attacks tests applications and other systems, covering all software development stages. Our team assists clients in quickly identifying and managing vulnerabilities to reduce the risk of incidents and deploy secure technology.

Copyright © 0 Fluid Attacks. We hack your software. All rights reserved.