Summary
A SQL injection vulnerability in indieka900 online-shopping-system-php 1.0 allows crafted input in the proId parameter of master/review_action.php to be interpreted as part of database queries.
When user-controlled data is concatenated directly into SQL statements without proper sanitization or parameterization, an attacker can manipulate queries to access, modify, or destroy backend data and potentially compromise the entire application.
Affected context
The vulnerability occurs in the review handling functionality of the indieka900 online-shopping-system-php 1.0 application, specifically in master/review_action.php.
The proId parameter, which likely identifies a product or review target, is used in database operations without robust input handling.
This issue is present when requests reaching this script can influence SQL queries, such as through GET/POST parameters or AJAX calls, and when the underlying database user has broad privileges.
Exploit preconditions
- Attack surface: HTTP(S) requests reaching
master/review_action.php - Required access: Ability to send web requests to the application endpoint (typically unauthenticated or low-privilege user access, depending on deployment)
- Trigger point: Supplying specially crafted values in the
proIdparameter that are incorporated directly into SQL queries - Why exploitation is possible: The application appears to concatenate raw
proIdinput into SQL statements without using prepared statements, parameter binding, or sufficient server-side validation, enabling arbitrary query manipulation
Why this happens
This vulnerability is rooted in constructing SQL queries by directly interpolating user-controlled data (proId) into the query string.
Instead of using prepared statements or parameterized queries, the script likely builds SQL by string concatenation, which allows input to change the structure and intent of the query.
This behavior aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where input is not neutralized before being included in database commands.
Potential impact
- Attackers may read sensitive information from arbitrary database tables.
- Malicious users could modify or delete product, user, order, or review data.
- The application's authentication data may be exposed, enabling account takeover outside the SQL channel.
- In some database setups, attackers can execute administrative database operations (e.g., creating new accounts or changing configuration).
- If the database supports it and permissions allow, SQL injection could be chained into remote code execution at the OS or application level.
General mitigation guidance
Effective mitigation focuses on removing direct string concatenation of user input into SQL and tightening trust boundaries around request parameters:
- Prefer parameterized queries and prepared statements for all database interactions that depend on user input (including
proId). - Apply strict server-side validation and normalization of identifiers such as product IDs (e.g., enforcing numeric types or whitelisted formats before reaching the data layer).
- Centralize database access in a data access layer that enforces parameterization and disallows ad-hoc query building in UI controllers.
- Configure database accounts with least privilege, ensuring the application user has only the minimum permissions required to operate (no unnecessary administrative rights).
- Consider using query-building abstractions or ORMs that encourage safe query patterns by default.
How teams detect issues like this
Organizations can identify similar issues by combining code-level analysis with policy checks:
- Use static application security testing (SAST) to flag direct concatenation of request parameters into SQL strings, especially within PHP scripts handling user inputs.
- During manual code review, look for
$_GET,$_POST, or$_REQUESTvariables used directly inmysql_*,mysqli_*, or PDO query strings without bound parameters. - Enforce coding standards that mandate prepared statements and prohibit raw SQL string construction in controller or view layers.
- Employ dynamic analysis or web application scanning tools configured with SQL injection tests aimed at parameters like
proIdand review-related endpoints.

