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 file '/ajax.php?action=save_customer', where the 'id' parameter is not properly validated, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, potentially leading to unauthorized database access, data manipulation, and leakage of sensitive information.

Impact

Exploitation of this vulnerability allows for SQL injection, enabling attackers to interfere with database queries. This could result in unauthorized data access, data modification or deletion, and in some cases, executing administrative operations on the database.

Reproduction

To reproduce this vulnerability, send a POST request to '/ajax.php?action=save_customer' with a crafted 'id' parameter that includes malicious SQL payloads. The injection can be verified by observing the application's response or by using a tool like sqlmap to extract database information.

Remediation

Users are advised to update to a version of the Pharmacy Sales and Inventory System that addresses this vulnerability. Implementing input validation and using prepared statements for database queries can also help mitigate SQL injection risks.

Added: May 1, 2026, 5:18 AM
Updated: May 1, 2026, 5:18 AM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
3.1
exploitability
9.1
remediation
0.0
relevance
7.2
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.