CVE-2026-7087

SourceCodester Pharmacy Sales and Inventory System ajax.php sql injection

Published Apr 27, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
A security flaw has been discovered in SourceCodester Pharmacy Sales and Inventory System 1.0. Impacted is an unknown function of the file /ajax.php?action=save_sales. Performing a manipulation of the argument ID results in sql injection. The attack can be initiated remotely. The exploit has been released to the public and may be used for attacks.

Analysis

AI-generated

Technical impact

The vulnerability is an unsanitized injection point in the /ajax.php?action=save_sales endpoint of SourceCodester Pharmacy Sales and Inventory System 1.0, corresponding to CWE-74 (Improper Sanitization) and CWE-89 (SQL Injection). By altering the value of the ID parameter, an attacker can embed arbitrary SQL code that the backend database will execute. This allows the potential disclosure, modification, or deletion of data stored in the system. The flaw can be triggered from a remote location, and the existence of a publicly available exploit suggests that an attacker can craft a request with malicious SQL without needing additional credentials.

Affected Systems

The affected product is SourceCodester Pharmacy Sales and Inventory System version 1.0. No other versions or sub‑products are mentioned as vulnerable.

Risk and Exploitability

The CVSS score of 6.9 indicates medium severity and highlights the capacity for data compromise. The EPSS score is less than 1 percent, reflecting a low current exploitation probability, yet the public availability of an exploit increases the risk. The flaw is not listed in the CISA KEV catalog. A successful attack requires an attacker to contact the web application, send a forged request to the /ajax.php?action=save_sales URL with a malicious ID payload, and relies on the server executing that payload against the connected database.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply any official patch or newer version from SourceCodester that addresses the SQL injection flaw.
  • Replace the raw SQL construction for the ID parameter with a parameterized query or a stored procedure that sanitizes the input.
  • Restrict the database account used by the application to the minimal privileges necessary for its normal operation, limiting the potential damage if an injection succeeds.

Generated by OpenCVE AI on April 29, 2026 at 01:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Sourcecodester
Sourcecodester pharmacy Sales And Inventory System
Vendors & Products Sourcecodester
Sourcecodester pharmacy Sales And Inventory System
Type Values Removed Values Added
Description A security flaw has been discovered in SourceCodester Pharmacy Sales and Inventory System 1.0. Impacted is an unknown function of the file /ajax.php?action=save_sales. Performing a manipulation of the argument ID results in sql injection. The attack can be initiated remotely. The exploit has been released to the public and may be used for attacks.
Title SourceCodester Pharmacy Sales and Inventory System ajax.php sql injection
Weaknesses CWE-74
CWE-89
References
Metrics cvssV2_0

{'score': 7.5, 'vector': 'AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 7.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P'}

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Apr 29, 2026, 1:46 PM
Reserved
Apr 26, 2026, 8:20 AM
Status
Deferred
Published
Apr 27, 2026, 6:16 AM
Modified
Oct 26, 2026, 9:10 PM