SourceCodester Pharmacy Sales and Inventory System SQL Injection Vulnerability
SourceCodester Pharmacy Sales and Inventory System 1.0 is vulnerable to SQL injection via the ID parameter in the /ajax.php?action=save_type endpoint, allowing remote attackers to execute arbitrary SQL commands.
CVE search metadata
CVE search record: CVE-2026-7128. Severity: high. CVSS: 7.3. KEV: no. Product: Pharmacy Sales and Inventory System 1.0. Brief: SourceCodester Pharmacy Sales and Inventory System SQL Injection Vulnerability. Brief link: https://feed.craftedsignal.io/briefs/2026-04-27-pharmacy-sqli/
Triage facts
Revision 2- Applicability
- Pharmacy Sales and Inventory System 1.0
- Evidence
- Unknown
- Severity
- High
- Sources
- 3 public sources
- Freshness
- Revision 2Apr 27, 14:16 UTC
- Detection
- 2 rules
- Vulnerabilities
- 1 CVE
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
A SQL injection vulnerability has been identified in SourceCodester Pharmacy Sales and Inventory System version 1.0. The vulnerability resides in the /ajax.php?action=save_type endpoint and is triggered by manipulating the ID argument. Successful exploitation allows a remote attacker to inject and execute arbitrary SQL commands within the application's database. Publicly available exploits exist, increasing the likelihood of exploitation. This vulnerability poses a significant risk to organizations using the affected software, potentially leading to data breaches, data manipulation, or complete system compromise.
Attack Chain
- The attacker identifies a vulnerable instance of SourceCodester Pharmacy Sales and Inventory System 1.0.
- The attacker crafts a malicious HTTP request targeting the
/ajax.php?action=save_typeendpoint. - The request includes a manipulated
IDparameter containing a SQL injection payload. - The application fails to properly sanitize the
IDparameter before using it in a SQL query. - The malicious SQL payload is executed against the application's database.
- The attacker may extract sensitive data from the database, such as user credentials or financial records.
- The attacker may modify data within the database, potentially altering inventory levels or pricing information.
- The attacker could potentially gain complete control over the database server, leading to full system compromise.
Impact
Successful exploitation of this SQL injection vulnerability could lead to unauthorized access to sensitive customer data, financial records, and proprietary business information. An attacker could potentially modify or delete data, disrupt business operations, and compromise the entire system. While specific victim numbers are unknown, any organization using SourceCodester Pharmacy Sales and Inventory System 1.0 is potentially at risk. The CVSS v3.1 score of 7.3 indicates a high level of severity.
Recommendation
- Apply input validation and sanitization to the
IDparameter in the/ajax.php?action=save_typeendpoint to prevent SQL injection attacks. - Deploy the Sigma rule provided below to detect suspicious requests targeting the vulnerable endpoint.
- Monitor web server logs for unusual activity and SQL-related errors, referencing the file path
/ajax.php?action=save_type. - Upgrade to a patched version of SourceCodester Pharmacy Sales and Inventory System once available.
Detection coverage 2
Detect SQL Injection Attempt in Pharmacy Sales System
highDetects potential SQL injection attempts targeting the /ajax.php endpoint by looking for specific SQL keywords in the query string.
Detect Access to Vulnerable AJAX Endpoint
mediumThis rule detects access to the specific vulnerable endpoint in SourceCodester Pharmacy Sales and Inventory System.
Detection queries are available on the platform. Get full rules →