/

CVE-2026-94015

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Drug Recommendation edit_user.php

CVE-2026-94015

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Disclosure and Manipulation

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in the Drug Recommendation System allows remotely supplied input in the user identifier parameter to influence database queries.

If the affected administrative endpoint is reachable and the input is insufficiently constrained, an attacker may read, alter, or otherwise manipulate database contents.

Affected context

The issue occurs in the SourceCodester Drug Recommendation System 1.0 administrative endpoint /drug_recommender/Admin/edit_user.php. It appears to depend on manipulation of the ID argument and becomes risky when that value is incorporated into database operations without effective parameterization or equivalent query separation. Exposure is greater when the endpoint is remotely reachable and access controls do not sufficiently restrict it.

Exploit preconditions

  • Attack surface: Remotely accessible administrative web endpoint
  • Required access: The ability to send requests to the affected endpoint; authentication requirements depend on the deployment
  • Trigger point: Processing of the ID argument in edit_user.php
  • Why exploitation is possible: User-controlled input may be interpreted as part of a database statement rather than treated strictly as data

Why this happens

The underlying bug is an injection flaw in which externally controlled input is combined with a database query without reliable separation between code and data. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). The related CWE-74 classification reflects the broader failure to neutralize input before it reaches an interpreted command or query context.

Potential impact

  • An attacker may read sensitive records from the application database
  • Database contents could be modified, deleted, or corrupted
  • Authentication or authorization data could be affected
  • The application may experience service disruption
  • Compromised data could support further attacks against users or connected systems

General mitigation guidance

Mitigation generally focuses on ensuring that request values cannot alter the structure of database commands.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all database operations
  • Apply allowlist validation and type constraints to identifier parameters
  • Keep database credentials limited to the minimum required privileges
  • Avoid constructing SQL statements through string concatenation
  • Enforce authentication and authorization checks around administrative endpoints
  • Return generic database errors to clients while recording useful security telemetry internally

These controls reduce exposure by limiting both injection opportunities and the damage possible if an endpoint is misused.

How teams detect issues like this

Organizations can look for SQL injection risks through:

  • Static analysis rules identifying string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Dynamic testing of identifier and filter parameters using safe security test cases
  • Web application firewall or API gateway policies for suspicious query-manipulation patterns
  • Database monitoring for unexpected query shapes, privilege use, or access to unrelated tables

Automated security review tools may help identify unsafe query-building patterns, but findings should be validated against the application's data-access design.

Sources

SourceLink
github.comgithub.com/KaranParelkar/Drug_recommendation_system/blob/main/sqli/edit_user/Readme.md
vuldb.comvuldb.com/cve/CVE-2026-94015
vuldb.comvuldb.com/submit/944860
vuldb.comvuldb.com/vuln/407955
vuldb.comvuldb.com/vuln/407955/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes, the reported attack surface is a remotely accessible web endpoint. Practical exploitability still depends on whether the endpoint is exposed and what access controls are enforced.

The available description does not establish a required authentication level. Access to the endpoint and the deployment's administrative protections determine whether an attacker must first authenticate.

Use parameterized database queries, strictly validate the identifier as the expected data type, and avoid building SQL through string concatenation.

Combine secure data-access APIs with least-privilege database accounts, authorization checks, code review, automated analysis, and monitoring of unusual database activity.

Find out what's already
exploitable in your codebase.