/

CVE-2026-103231

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Restaurant Order Cancellation

CVE-2026-103231

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise and unauthorized 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 Restaurant-Management-System's order cancellation function allows attacker-controlled input to influence a database query. If the affected endpoint is reachable and the request parameter is not safely handled, a remote attacker may read, modify, or otherwise interfere with database operations.

Affected context

The issue occurs in the order cancellation component, specifically in User/cancel.php, where the ID argument is passed into a mysqli_query call. Deployments may be at risk when this endpoint is remotely accessible and input is incorporated into SQL statements without reliable parameterization or equivalent query controls.

Exploit preconditions

  • Attack surface: Remotely reachable order-cancellation functionality - Required access: Access sufficient to submit a cancellation request; the

exact authorization requirement depends on deployment configuration

  • Trigger point: Processing of the ID argument by User/cancel.php - Why exploitation is possible: Attacker-controlled input may alter the

structure or behavior of the database query when it is not safely separated

from SQL syntax

Why this happens

The underlying bug is insufficient separation between untrusted request data and SQL commands. When the ID argument is concatenated into or otherwise unsafely interpreted by a mysqli_query operation, specially formed input can change query semantics. This behavior maps primarily to CWE-89, SQL Injection; CWE-74 broadly describes the failure to neutralize special elements that influence an interpreter.

Potential impact

  • An attacker may retrieve data that the application account can access.
  • An attacker could modify, delete, or corrupt order and customer records.
  • Database availability may be affected through disruptive queries.
  • Compromised database credentials or sensitive records could enable further intrusion.
  • Business workflows and order-cancellation integrity may be undermined.

General mitigation guidance

Mitigation generally centers on ensuring that request values cannot become SQL syntax. Secure-by-default patterns include parameterized queries or prepared statements, strict server-side validation against the expected identifier type, and allowlist-based input handling. Database accounts should use the least privileges needed by the cancellation workflow, while error responses should avoid exposing query details. Reducing trust in client-supplied identifiers by deriving authorization context from the authenticated session can further limit abuse.

How teams detect issues like this

Detection can include static analysis for string concatenation or interpolation involving request parameters and SQL execution functions such as mysqli_query. Code review should flag direct use of GET or POST values in query construction, missing prepared statements, weak identifier validation, and excessive database privileges. Runtime monitoring can look for anomalous cancellation requests, repeated database errors, unexpected query patterns, and access to records outside a user's normal scope. CI policy enforcement and automated code-review tools may help identify unsafe database access patterns before deployment.

Sources

SourceLink
github.comgithub.com/AdithyaYelloju/Restaurant-Management-System/
github.comgithub.com/AdithyaYelloju/Restaurant-Management-System/issues/7
vuldb.comvuldb.com/cve/CVE-2026-103231
vuldb.comvuldb.com/submit/955080
vuldb.comvuldb.com/vuln/411924
vuldb.comvuldb.com/vuln/411924/cti

Frequently asked

questions

It may be remotely exploitable when the order-cancellation endpoint is exposed

and an attacker can submit requests that reach the vulnerable database query.

The attacker needs enough access to invoke the cancellation function. Whether

authentication or a valid order is required depends on the application's

routing and authorization controls.

Use parameterized queries or prepared statements, validate the identifier on the

server, and ensure the database account has only the permissions required for

order cancellation.

Standardize safe database-access interfaces, prohibit dynamic SQL built from

request data, review authorization around sensitive actions, and enforce

automated static-analysis and CI policies for injection risks.

Find out what's already
exploitable in your codebase.