/

CVE-2026-14695

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Grocery System Registration

CVE-2026-14695

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database 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 flaw in the registration handler of the SourceCodester Multi-Vendor Online Grocery Management System allows crafted Name input to alter backend database queries.

When user-supplied registration data is concatenated directly into SQL statements, attackers can remotely manipulate or access data beyond their intended permissions.

Affected context

This vulnerability occurs in the user registration workflow, specifically within the save_client function in classes/Users.php.

It is relevant where the application accepts a Name field from clients, builds SQL queries using string concatenation, and executes them without proper parameterization or robust input handling.

Deployments exposed to the internet or shared networks, with reachable registration endpoints and direct database connections, are more likely to be impacted.

Exploit preconditions

  • Attack surface: Public or network-accessible registration endpoint handling client creation.
  • Required access: Ability to submit registration requests (e.g., via web form or direct HTTP calls).
  • Trigger point: Processing of the Name parameter by the save_client function when constructing and executing SQL statements.
  • Why exploitation is possible: The Name value is embedded directly into an SQL query without parameterized statements or proper escaping, allowing attacker-controlled input to change the query structure.

Why this happens

The underlying issue is the direct inclusion of untrusted user input into dynamically constructed SQL commands.

Instead of using prepared statements or ORM-layer parameter binding, the save_client function appears to concatenate the Name field into query strings, making the database interpret parts of user input as SQL logic.

This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and is related to CWE-74: Improper Neutralization of Special Elements in Output, as special characters are not correctly sanitized before being sent to the database engine.

Potential impact

  • Attackers may read sensitive data from user and client tables beyond their own account.
  • Malicious users could modify or delete customer records, orders, and inventory data.
  • SQL injection can be used to create new privileged accounts or escalate existing privileges.
  • The application database could be corrupted, leading to partial or total data loss.
  • In certain configurations, attackers may chain database access to compromise the underlying host environment.

General mitigation guidance

Mitigation generally focuses on treating all user-provided fields, including Name, as untrusted and preventing them from altering query structure.

Common defensive patterns include:

  • Using parameterized queries and prepared statements for all database operations instead of string concatenation.
  • Employing an ORM or database abstraction layer that enforces safe query building by default.
  • Implementing centralized input validation for registration fields to enforce expected formats and lengths.
  • Applying least-privilege to database accounts so that application-level credentials cannot perform unnecessary administrative actions.
  • Designing error handling so that database error messages do not reveal query details or schema information.

How teams detect issues like this

Detection can combine automated and manual review techniques:

  • Static analysis rules that flag dynamic SQL construction using string concatenation or unsafe interpolation in PHP files (e.g., Users.php).
  • Code review practices that require inspection of all data access layers for parameterized queries and validation routines.
  • Runtime monitoring for anomalous SQL patterns, such as unexpected logical operators or union queries originating from registration requests.
  • Security-focused test cases and dynamic application security testing that systematically probe input fields like Name for SQL injection behavior.
  • Integration of automated code scanning tools into CI/CD pipelines to enforce policies against unsafe query construction.

Sources

SourceLink
github.comgithub.com/lee945/cve/issues/6
vuldb.comvuldb.com/cve/CVE-2026-14695
vuldb.comvuldb.com/submit/846835
vuldb.comvuldb.com/vuln/376291
vuldb.comvuldb.com/vuln/376291/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

It can be exploited remotely by anyone who can reach the registration endpoint and submit crafted Name values, making it broadly accessible on internet-facing deployments.

Only the ability to interact with the registration form or endpoint is required; no prior authentication is typically necessary, as the vulnerability resides in initial client registration.

The most robust fix is to refactor database interactions to use parameterized queries or prepared statements throughout the codebase, ensuring user input is bound as data rather than concatenated into SQL strings.

Establish secure coding standards that prohibit dynamic SQL concatenation, enforce regular code and security reviews of data access layers, and adopt frameworks or ORM tools that promote safe-by-default query construction and centralized validation of all externally supplied inputs.

Find out what's already
exploitable in your codebase.