CVE-2026-7088
SQL Injection in SourceCodester Pharmacy System Allows Remote Exploit
Publication date: 2026-04-27
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-7088 is a critical SQL injection vulnerability found in the SourceCodester Pharmacy Sales and Inventory System 1.0, specifically in the file /ajax.php?action=save_receiving.
The vulnerability arises because the 'id' parameter, which is sent via POST requests, is not properly validated or sanitized. This allows attackers to inject malicious SQL code into the database queries.
The type of SQL injection is Boolean-based blind SQL injection, which enables attackers to infer database information by sending conditional SQL payloads.
Exploitation does not require any authentication and can be performed remotely.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by testing the vulnerable parameter `id` in the POST request to `/ajax.php?action=save_receiving` for SQL injection.
Tools such as sqlmap can be used to confirm the injection vector and database exposure.
- Example of a proof of concept payload to test the vulnerability: id=(SELECT (CASE WHEN (4784=4784) THEN 5 ELSE (SELECT 7976 UNION SELECT 3350) END))
- Use sqlmap with a command similar to: sqlmap -u "http://target/ajax.php?action=save_receiving" --data="id=1" --risk=3 --level=5
What immediate steps should I take to mitigate this vulnerability?
- Use prepared statements with parameter binding to ensure user inputs are treated as data and not executable SQL code.
- Implement strict input validation and filtering to reject malicious content and ensure inputs conform to expected formats.
- Minimize database user permissions by applying the principle of least privilege, avoiding use of high-privilege accounts like root or admin for routine operations.
- Conduct regular security audits to detect and remediate vulnerabilities promptly.
Immediate patching and security hardening are critical to protect the systemβs integrity and prevent exploitation.
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 database access, leakage of sensitive data, data tampering, and potential full system compromise. Such impacts can lead to violations of data protection regulations like GDPR and HIPAA, which mandate the protection of personal and health information against unauthorized access and breaches.
Failure to remediate this vulnerability could result in non-compliance with these standards due to compromised confidentiality, integrity, and availability of sensitive data.
How can this vulnerability impact me? :
This vulnerability can have severe impacts including unauthorized access to the database, leakage of sensitive data, data tampering or deletion, potential full system compromise, and service disruption.
Because no authentication is required to exploit this vulnerability, attackers can remotely launch attacks without any prior access.