/

CVE-2026-105167

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Food-Waste admin/donate.php

CVE-2026-105167

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise and unauthorized data access

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 food-waste-management-system may allow attacker-controlled input in the location argument to influence database queries. Because the affected endpoint is remotely reachable, an attacker who can access it may read, alter, or otherwise manipulate database data when input is not safely handled.

Affected context

The issue occurs in the administrative donation functionality at admin/donate.php, where the location argument is used in database-related processing. Risk is present when remotely supplied values reach SQL construction without parameterization or equivalent query-safety controls; the exact exposure may depend on deployment routing and access restrictions.

Exploit preconditions

  • Attack surface: The remotely accessible admin/donate.php endpoint
  • Required access: Network access to the endpoint; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the location argument
  • Why exploitation is possible: User-controlled input may influence SQL query structure when it is incorporated without safe parameter binding

Why this happens

The underlying bug is an injection flaw in which externally controlled input is allowed to affect the structure or meaning of a database query. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and more broadly to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. The insecure pattern is constructing or modifying SQL statements with untrusted values instead of treating those values strictly as data.

Potential impact

  • An attacker may read unauthorized database records
  • An attacker could modify or delete application data
  • Sensitive administrative or user information may be exposed
  • Database availability may be affected through destructive or resource-intensive operations
  • The application could be used as a stepping stone for broader compromise if database privileges are excessive

General mitigation guidance

Mitigation generally focuses on separating SQL code from user-provided data and reducing the trust placed in request parameters.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all database operations
  • Apply allowlist validation for values such as location identifiers where the business rules permit it
  • Avoid dynamically assembled SQL and use safe data-access abstractions
  • Apply least-privilege permissions to the application's database account
  • Return generic database errors and avoid exposing query details to clients
  • Enforce authentication and authorization checks on administrative functionality
  • Add regression tests covering untrusted input at every database access path

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Dynamic application testing that monitors query behavior using controlled validation inputs
  • Database monitoring for unusual query patterns, errors, privilege use, or unexpected data access
  • Web application firewall or gateway policies that detect suspicious injection indicators as a secondary control
  • CI security policies requiring parameterized database access and review of administrative endpoints

Sources

SourceLink
github.comgithub.com/kishor-23/food-waste-management-system/
github.comgithub.com/kishor-23/food-waste-management-system/issues/7
vuldb.comvuldb.com/cve/CVE-2026-105167
vuldb.comvuldb.com/submit/970271
vuldb.comvuldb.com/vuln/413399
vuldb.comvuldb.com/vuln/413399/cti

Frequently asked

questions

Potentially. The affected functionality is described as remotely reachable, but practical exploitability depends on network exposure, authentication, authorization, and application deployment settings.

At minimum, an attacker generally needs network access to the relevant endpoint. Whether a valid account or administrative role is also required depends on how the application protects admin/donate.php.

Use parameterized queries or prepared statements so the location value is handled only as data, together with strict validation and least-privilege database permissions.

Standardize safe database APIs, prohibit dynamic SQL construction in review and CI policies, test all request-to-query data flows, and monitor database activity for anomalous behavior.

Find out what's already
exploitable in your codebase.