CVE-2026-7199
SQL Injection in SourceCodester Pharmacy System Allows Remote Exploit
Publication date: 2026-04-28
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| sourcecodester | pharmacy_sales_and_inventory_system | 1.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-74 | The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. |
| CWE-89 | The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-7199 is a critical SQL injection vulnerability found in version 1.0 of the Pharmacy Sales and Inventory System. It exists in the file /ajax.php when the action=delete_product parameter is used. The vulnerability arises because the id parameter is not properly validated or sanitized before being used in SQL queries.
This flaw allows attackers to inject malicious SQL code remotely without any authentication, enabling unauthorized manipulation of the database.
How can this vulnerability impact me? :
Exploitation of this vulnerability can lead to unauthorized database access, leakage of sensitive data, tampering with or deletion of data, and potentially gaining full control over the affected system.
Attackers can also cause service disruptions, threatening system security and business continuity.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by testing the /ajax.php endpoint with the action=delete_product parameter, specifically targeting the id argument for SQL injection.
A proof-of-concept involves performing a boolean-based blind SQL injection via the id POST parameter to confirm the vulnerability.
Using automated tools like sqlmap can help detect and confirm the SQL injection vulnerability by enumerating the database through crafted payloads.
- Example sqlmap command: sqlmap -u "http://target/ajax.php?action=delete_product" --data="id=1" --method=POST --batch
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include implementing prepared statements with parameter binding to separate SQL code from user input, preventing SQL injection.
Enforce strict input validation and filtering to ensure that inputs conform to expected formats before processing.
Minimize database user permissions by avoiding the use of high-privilege accounts such as root or admin for routine database operations.
Conduct regular security audits of the code and systems to detect and address vulnerabilities promptly.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The SQL injection vulnerability in the Pharmacy Sales and Inventory System allows unauthorized access and manipulation of the database, which can lead to data breaches and loss of data integrity.
Such unauthorized access and potential exposure of sensitive data can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of personal and health-related information.
Failure to secure the system against this vulnerability may result in violations of data protection requirements, leading to legal and financial consequences.