/

CVE-2026-93997

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Drug Recommendation System

CVE-2026-93997

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Access 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 attacker-controlled input in the ID argument of /Admin/edit_symptom.php to alter database queries. Because the affected endpoint is remotely reachable, an attacker may access, modify, or otherwise interfere with database information when input is not safely handled.

Affected context

The weakness occurs in the administrative symptom-editing functionality of SourceCodester Drug Recommendation System 1.0. It becomes risky when the ID request parameter is incorporated into database queries without reliable parameterization, validation, or contextual escaping, particularly if the endpoint is exposed to remote users.

Exploit preconditions

  • Attack surface: The remotely reachable /Admin/edit_symptom.php endpoint
  • Required access: Ability to send requests to the affected functionality; authentication requirements may depend on the deployment configuration
  • Trigger point: Processing of the ID argument during symptom-edit operations
  • Why exploitation is possible: Attacker-controlled input may influence SQL query structure when it is concatenated into a database statement without parameter binding

Why this happens

The underlying bug is an injection flaw in which externally supplied input is treated as part of a SQL statement rather than as data. This behavior maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection. CWE-74 is also relevant as a broader classification for improper neutralization of special elements in output used by a downstream interpreter.

Potential impact

  • An attacker may read unauthorized records from the application database.
  • An attacker could modify or delete symptom and related application data.
  • Database integrity and availability may be affected.
  • Sensitive information stored in the database may be disclosed.
  • Compromised data could undermine recommendation accuracy or application trust.

General mitigation guidance

Mitigation generally centers on ensuring that database commands cannot be structurally altered by request data.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every database operation.
  • Apply allowlist validation for identifier-like values such as numeric record IDs.
  • Avoid constructing SQL statements through string concatenation.
  • Enforce authorization checks independently of input validation before editing records.
  • Limit the database account to the minimum permissions required by the application.
  • Use secure error handling that does not expose query details or database diagnostics.
  • Treat all client-supplied values as untrusted, including values submitted through administrative interfaces.

How teams detect issues like this

Detection can include static analysis for SQL statements built through string concatenation, especially where request parameters such as ID flow into query construction. Code reviews should look for missing prepared statements, weak validation of identifier fields, inconsistent authorization checks, and verbose database errors. Dynamic testing and web application security testing can verify that unexpected input is handled as data without changing query behavior. CI policy checks may require approved database access libraries and reject unsafe query-construction patterns.

Sources

SourceLink
github.comgithub.com/KaranParelkar/Drug_recommendation_system/blob/main/sqli/edit_symptom_id_parameter/Readme.md
vuldb.comvuldb.com/cve/CVE-2026-93997
vuldb.comvuldb.com/submit/944843
vuldb.comvuldb.com/vuln/407948
vuldb.comvuldb.com/vuln/407948/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. The affected functionality is described as remotely reachable, although authentication and authorization requirements depend on how the application is deployed.

An attacker must be able to submit requests to the vulnerable endpoint. If administrative authentication is enforced, access to an appropriate account or an additional access-control weakness may be necessary.

Use parameterized queries or prepared statements, validate identifier values with strict allowlists, and enforce authorization before performing the database operation.

Treat all request parameters as untrusted, standardize safe database-access APIs, minimize database privileges, review query construction during code review, and include injection testing in automated security checks.

Find out what's already
exploitable in your codebase.