/

CVE-2026-127284

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Food Ordering System Admin

CVE-2026-127284

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Potential unauthorized database access or modification

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

SourceCodester Food Ordering System 1.0 has a SQL injection flaw in its admin category write handler. If attacker-controlled values reach database queries without safe handling, a remote attacker may be able to alter those queries.

Affected context

The reported issue is associated with admin/add_category.php in the Admin Write Handler of SourceCodester Food Ordering System 1.0. The description identifies the title, description, price, current_image, featured, active, and id arguments as potentially affected, but does not specify the exact vulnerable code path or authentication requirements.

Exploit preconditions

  • Attack surface: The admin category write handler is reachable over the network.
  • Required access: The description does not establish whether authentication or a particular privilege level is required.
  • Trigger point: One or more of the identified arguments are processed by the handler and used in a database query.
  • Why exploitation is possible: SQL injection can occur when input is incorporated into a query without effective parameterization or equivalent safe handling.

Why this happens

The reported flaw is SQL injection, mapped to CWE-89. It can arise when an application builds a database query by mixing input values with SQL syntax instead of treating those values strictly as data. CWE-74 is a broader classification for improper neutralization of special elements in output used by another component; here, the reported affected component is a SQL query.

Potential impact

  • An attacker may be able to read or alter database data, depending on query behavior and database permissions.
  • Database records or application state could be modified or deleted.
  • Confidentiality, integrity, or availability may be affected, depending on the reachable queries and privileges.

General mitigation guidance

Common defensive patterns focus on keeping untrusted input separate from SQL syntax:

  • Use parameterized queries or prepared statements for database operations.
  • Validate values against expected types, lengths, and business rules as an additional safeguard.
  • Avoid constructing SQL statements through string concatenation.
  • Apply least privilege to the database account used by the application.
  • Limit access to administrative write functions to appropriately authorized users.

How teams detect issues like this

High-level approaches include:

  • Use static analysis to identify query construction that concatenates request-derived values.
  • Review database access paths in the category write handler and verify that inputs are bound as parameters.
  • Apply code review checks for unsafe query APIs and enforce parameterized-query policies.
  • Monitor database and application logs for anomalous query errors or unexpected write activity, while avoiding reliance on logs as the only control.

Sources

SourceLink
github.comgithub.com/yuechuya/sourcecodester-vuln-reports/blob/main/reports/Food-Ordering-System/VULN-F2-Unauth-SQL-Injection.md
vuldb.comvuldb.com/cve/CVE-2026-127284
vuldb.comvuldb.com/submit/1041049
vuldb.comvuldb.com/vuln/436450
vuldb.comvuldb.com/vuln/436450/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

The report says the attack can be initiated remotely. It does not specify whether authentication is required.

The necessary access level is unclear from the available description. The admin write handler must be reachable, and any applicable authorization controls affect who can reach it.

Use parameterized queries so input values are handled as data rather than SQL syntax, and apply least privilege to the database account.

Combine parameterized database access with input validation, static analysis, code review, and authorization checks on administrative write operations.

Find out what's already
exploitable in your codebase.