/

CVE-2026-76998

Severity:

HIGH RISK

(7.3)

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

CVE-2026-76998

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise, unauthorized data access, and data 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 administrative category-deletion endpoint of SourceCodester Simple Online Food Ordering System 1.0 allows attacker-controlled input in the category ID parameter to influence database queries.

Because the endpoint is remotely reachable, an attacker who can access it may read, alter, or damage application data, depending on database permissions and authentication controls.

Affected context

The vulnerability occurs in the administrative AJAX handler at /admin/ajax.php?action=delete_category, where the ID argument is used during category deletion. Risk is higher when the endpoint is internet-accessible, insufficiently protected by authentication and authorization, or when database queries incorporate request parameters without safe parameter binding.

Exploit preconditions

  • Attack surface: The remotely reachable administrative AJAX endpoint for category deletion
  • Required access: Network access to the endpoint; authentication requirements depend on the deployment's administrative access controls
  • Trigger point: Processing the category ID request parameter
  • Why exploitation is possible: The parameter may be incorporated into a database query without adequate separation between data and SQL syntax

Why this happens

The underlying bug is an SQL injection flaw caused by treating request-controlled input as part of a database command rather than strictly as a value. When query construction relies on string concatenation or equivalent unsafe patterns, specially structured input can change the intended query behavior. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, with CWE-74 describing the broader class of injection vulnerabilities.

Potential impact

  • An attacker may retrieve unauthorized application or database information
  • Database records could be modified or deleted
  • Application functionality may be disrupted
  • Administrative data, including ordering or category information, could be corrupted
  • The database account's privileges could increase the scope of compromise

General mitigation guidance

Mitigation generally focuses on ensuring that request data can never alter SQL structure and on reducing the privileges available to the application database account.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations
  • Applying allowlisted type and range validation to identifier inputs
  • Avoiding dynamic SQL construction from request parameters
  • Enforcing authentication and authorization at the administrative endpoint
  • Running the application with a narrowly scoped database account
  • Using consistent error handling that does not expose database details
  • Applying secure-by-default database access and configuration policies

How teams detect issues like this

Organizations can look for this 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 testing of administrative endpoints using safely controlled injection test cases
  • Web application firewall or gateway policies that monitor suspicious database-language patterns
  • Database audit logging for unexpected queries, deletion activity, and unusual administrative access

Automated application-security review tools may help identify unsafe query construction, but findings should be verified against the actual query and authorization flow.

Sources

SourceLink
github.comgithub.com/normabowie11-max/cve/issues/1
vuldb.comvuldb.com/cve/CVE-2026-76998
vuldb.comvuldb.com/submit/880465
vuldb.comvuldb.com/vuln/393621
vuldb.comvuldb.com/vuln/393621/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. The affected administrative endpoint is remotely reachable, although practical exploitability depends on network exposure, authentication, and authorization controls.

Not necessarily from the vulnerability description. The required access depends on how the application protects its administrative AJAX handlers and whether those controls can be bypassed.

Use parameterized database queries for the category identifier, validate it as an expected identifier type, and enforce authorization before performing the deletion.

Standardize secure database-access abstractions, prohibit dynamically assembled SQL in code review and CI policies, apply least-privilege database permissions, and monitor administrative database activity.

Find out what's already
exploitable in your codebase.