Description
A vulnerability has been found in SourceCodester Pharmacy Sales and Inventory System 1.0. The affected element is an unknown function of the file /ajax.php?action=login. Such manipulation of the argument Username leads to sql injection. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used.
Published: 2026-04-13
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Remote SQL Injection leading to data compromise
Action: Immediate Patch
AI Analysis

Impact

The flaw resides in the ajax.php script that processes the login action, where the Username parameter is not properly sanitized. This allows an attacker to inject arbitrary SQL statements, potentially bypassing authentication or modifying database contents. The weakness is a classic SQL injection, identified as CWE-89. The likely attack vector is a remote HTTP request to /ajax.php?action=login containing a crafted Username value, a scenario inferred from the description, which states the attack can be launched remotely.

Affected Systems

SourceCodester Pharmacy Sales and Inventory System, version 1.0, uses the ajax.php file during user authentication.

Risk and Exploitability

The CVSS score of 6.9 reflects a moderate threat level. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker can exploit the flaw remotely by sending HTTP requests with malicious input; if successful, the attacker could read or modify sensitive data. The risk therefore encompasses confidentiality and integrity compromise and is considered significant due to the potential for widespread data exposure.

Generated by OpenCVE AI on April 13, 2026 at 19:05 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Check for an official update or patch from SourceCodester and apply it immediately if available.
  • If no patch exists, modify the login routine to use parameterized prepared statements that safely escape user input.
  • Limit the database account permissions to the minimum necessary actions for the application.
  • Implement input validation on the Username field to reject suspicious characters or patterns.
  • Deploy a web application firewall to detect and block SQL injection payloads.
  • Continuously monitor application logs for unusual SQL queries or failed login attempts.

Generated by OpenCVE AI on April 13, 2026 at 19:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Apr 2026 16:30:00 +0000

Type Values Removed Values Added
First Time appeared Sourcecodester
Sourcecodester pharmacy Sales And Inventory System
Vendors & Products Sourcecodester
Sourcecodester pharmacy Sales And Inventory System

Mon, 13 Apr 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 13 Apr 2026 16:45:00 +0000

Type Values Removed Values Added
Description A vulnerability has been found in SourceCodester Pharmacy Sales and Inventory System 1.0. The affected element is an unknown function of the file /ajax.php?action=login. Such manipulation of the argument Username leads to sql injection. It is possible to launch the attack remotely. The exploit has been disclosed to the public 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'}


Subscriptions

Sourcecodester Pharmacy Sales And Inventory System
cve-icon MITRE

Status: PUBLISHED

Assigner: VulDB

Published:

Updated: 2026-04-13T18:54:51.874Z

Reserved: 2026-04-13T08:36:32.018Z

Link: CVE-2026-6189

cve-icon Vulnrichment

Updated: 2026-04-13T18:54:40.880Z

cve-icon NVD

Status : Deferred

Published: 2026-04-13T17:16:31.693

Modified: 2026-04-29T01:00:01.613

Link: CVE-2026-6189

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-14T16:33:59Z

Weaknesses