CVE-2026-7283
Received Received - Intake
SQL Injection in SourceCodester Pharmacy System Enables Remote Attack

Publication date: 2026-04-28

Last updated on: 2026-04-29

Assigner: VulDB

Description
A security flaw has been discovered in SourceCodester Pharmacy Sales and Inventory System 1.0. This impacts the function save_expired of the file /ajax.php?action=save_expired. The manipulation of the argument ID results in sql injection. It is possible to launch the attack remotely. The exploit has been released to the public and may be used for attacks.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-28
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2026-04-28
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
sourcecodester pharmacy_sales_and_inventory_system 1.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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?

The CVE-2026-7283 vulnerability is a critical SQL injection flaw in the Pharmacy Sales and Inventory System Project V1.0, specifically in the file /ajax.php?action=save_expired.

It occurs because the id parameter, accepted via POST requests, is not properly validated or sanitized, allowing attackers to inject malicious SQL code.

This enables attackers to manipulate SQL queries directly, potentially gaining unauthorized access to the database, leaking data, tampering with data, or causing full system compromise or service disruption.

Exploitation does not require user authentication or authorization, making it easier for attackers to exploit remotely.


How can this vulnerability impact me? :

This vulnerability can have serious impacts including unauthorized access to sensitive database information, data leakage, and data tampering.

Attackers may also achieve full system compromise or disrupt services, which can affect the availability and integrity of the system.

Since the attack can be launched remotely without authentication, the risk of exploitation is high.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

The vulnerability can be detected by testing the vulnerable parameter `id` in the `/ajax.php?action=save_expired` endpoint for SQL injection flaws.

One common method is to use boolean-based blind SQL injection payloads such as: id=(SELECT (CASE WHEN (4784=4784) THEN 5 ELSE (SELECT 7976 UNION SELECT 3350) END)) to observe different responses.

Automated tools like sqlmap can be used to confirm the vulnerability by enumerating databases and executing arbitrary SQL commands.

Example sqlmap command to test the vulnerability might be:

  • sqlmap -u "http://target/ajax.php?action=save_expired" --data "id=1" --method POST --dbs

What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include:

  • Use prepared statements with parameter binding to separate SQL code from user input, preventing injection.
  • Implement strict input validation and filtering to ensure inputs conform to expected formats.
  • Limit database user permissions to the minimum necessary, avoiding use of high-privilege accounts like root or admin for routine operations.
  • Conduct regular security audits of code and systems to detect and fix 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 database access, data leakage, and data tampering. Such unauthorized access and potential exposure of sensitive data can lead to non-compliance with data protection regulations like GDPR and HIPAA, which require safeguarding personal and health-related information against unauthorized access and breaches.

Failure to remediate this vulnerability could result in violations of these standards due to compromised confidentiality, integrity, and availability of data, potentially leading to legal and financial penalties.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart