CVE-2026-7128

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 vulnerability has been detected in SourceCodester Pharmacy Sales and Inventory System 1.0. This issue affects some unknown processing of the file /ajax.php?action=save_type. Such manipulation of the argument ID leads to sql injection. The attack can be executed remotely. The exploit has been disclosed publicly and may be used.

Analysis

AI-generated

Technical impact

The vulnerability resides in the SourceCodester Pharmacy Sales and Inventory System 1.0, specifically in the ajax.php script that processes the action=save_type parameter. Manipulation of the ID argument permits unauthenticated attackers to inject arbitrary SQL statements, compromising the confidentiality and integrity of the database. The flaw is classified as CWE-74 and CWE-89, indicating improper handling of input data and unsafe query construction.

Affected Systems

Affected systems are installations of SourceCodester Pharmacy Sales and Inventory System 1.0. No newer versions are known from the CNA, and the vulnerability was reported for the 1.0 release. Any deployment using the standard ajax.php endpoint that accepts an ID parameter without proper validation is potentially vulnerable.

Risk and Exploitability

The CVSS score of 6.9 points to moderate severity, and the EPSS score is not available, so we cannot quantify current exploit likelihood. The vulnerability is not listed in CISA KEV. The likely attack vector is a remote HTTP request to /ajax.php with a malicious ID value; the attack can be performed without authentication, making it highly dangerous for exposed installations.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest supported version of SourceCodester Pharmacy Sales and Inventory System that includes a fix for the ajax.php ID injection.
  • Implement input validation and sanitization for the ID parameter in ajax.php to ensure only valid numeric or expected values are processed.
  • Configure the database user used by the application with the principle of least privilege, limiting CREATE, ALTER, and INSERT privileges.

Generated by OpenCVE AI on April 28, 2026 at 04:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
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
Metrics ssvc

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

Type Values Removed Values Added
Description A security vulnerability has been detected in SourceCodester Pharmacy Sales and Inventory System 1.0. This issue affects some unknown processing of the file /ajax.php?action=save_type. Such manipulation of the argument ID leads to sql injection. The attack can be executed remotely. The exploit has been disclosed publicly and may be used.
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 27, 2026, 2:11 PM
Reserved
Apr 26, 2026, 7:16 PM
Status
Deferred
Published
Apr 27, 2026, 2:16 PM
Modified
Oct 26, 2026, 12:10 AM