/

CVE-2026-79804

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in SililaWijesinghe Food System

CVE-2026-79804

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 high-severity SQL injection vulnerability in the Food Ordering System allows remote attackers to influence database queries through the search_box parameter on /search.php.

Successful exploitation may let an attacker read, alter, or delete database records, depending on the application's database permissions and query construction.

Affected context

The vulnerability affects deployments of the SililaWijesinghe Food Ordering System through the affected /search.php functionality. It becomes risky when the search_box value is incorporated into database queries without reliable parameterization, allowing externally supplied input to alter query behavior.

Exploit preconditions

  • Attack surface: The remotely accessible /search.php endpoint
  • Required access: Network access to the application; authentication may not be required
  • Trigger point: The search_box search parameter
  • Why exploitation is possible: User-controlled input may reach database query construction without effective parameter binding or filtering

Why this happens

The underlying bug is an injection flaw in which externally controlled input is treated as part of a SQL statement rather than as data.

This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). The broader CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') describes the general pattern of allowing input to modify commands interpreted by another component.

Potential impact

  • Attackers may read sensitive database records
  • Attackers could modify or delete food-ordering data
  • The vulnerability may expose customer, order, or administrative information
  • Database availability could be affected through resource-intensive or destructive queries
  • Application integrity and downstream business operations may be compromised

General mitigation guidance

Mitigation generally focuses on ensuring that search input cannot alter SQL syntax or database execution behavior.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every database operation
  • Treat all request parameters as untrusted, including search fields
  • Apply allowlist-based validation appropriate to the expected search format
  • Use database accounts with the minimum permissions required by the application
  • Avoid dynamically assembled SQL and prefer safe query-builder or ORM interfaces
  • Return generic database errors without exposing query details
  • Protect administrative and sensitive data with separate authorization controls

How teams detect issues like this

Organizations commonly identify SQL injection risks through:

  • Static analysis rules for string concatenation or interpolation in SQL execution paths
  • Code review checks for request parameters passed into database APIs
  • Dynamic testing of search and filter parameters with non-destructive injection probes
  • Web application firewall or API gateway policies for suspicious SQL metacharacter patterns
  • Database monitoring for unexpected query structures, access patterns, or error spikes
  • Automated security testing and neutral code-review tools that flag unparameterized queries

Sources

SourceLink
github.comgithub.com/niaoniaollll/cve/issues/2
vuldb.comvuldb.com/cve/CVE-2026-79804
vuldb.comvuldb.com/submit/876592
vuldb.comvuldb.com/vuln/395056
vuldb.comvuldb.com/vuln/395056/cti

Frequently asked

questions

Yes. The affected search functionality is exposed through a remotely accessible web endpoint, although actual exploitability depends on deployment exposure and request-handling controls.

The available description does not establish an authentication requirement. If /search.php is publicly reachable, an attacker may only need network access to the application.

Use parameterized queries or prepared statements, validate input according to the expected search format, and prevent user input from becoming SQL syntax.

Combine secure database APIs with least-privilege database accounts, code review rules, automated static analysis, and regular dynamic testing of externally supplied parameters.

Find out what's already
exploitable in your codebase.