SourceCodester Pharmacy Sales and Inventory System SQL Injection Vulnerability

Vulnerability

A SQL injection vulnerability has been identified in SourceCodester Pharmacy Sales and Inventory System version 1.0. The issue arises in the 'delete_supplier' function within 'ajax.php', where the 'id' parameter is manipulated, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, without the need for authentication.

Impact

Exploitation of this vulnerability allows unauthorized access to the database, potential leakage or modification of sensitive data, and could disrupt services, posing a significant risk to system security and business operations.

Reproduction

The vulnerability can be reproduced by sending a POST request to 'ajax.php' with the 'action' parameter set to 'delete_supplier'. The 'id' parameter should be crafted to include a SQL injection payload, such as a boolean-based blind SQL injection payload that manipulates the SQL query execution.

Remediation

To address this vulnerability, it is recommended to use prepared statements and parameter binding to prevent SQL injection, validate and filter user input, minimize database user permissions, and conduct regular security audits.

Added: Apr 29, 2026, 5:19 PM
Updated: Apr 29, 2026, 5:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
3.1
exploitability
9.1
remediation
0.0
relevance
7.1
threat
6.4
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.