Summary
SUP Online Shopping 1.0 contains a SQL injection flaw in /admin/message.php where the seenid parameter is passed into a database query without proper sanitization or parameterization.
A remote attacker can manipulate this parameter to alter backend SQL queries, which may lead to data exposure, data modification, or administrative account compromise when crafted input is processed by the vulnerable endpoint.
Affected context
The vulnerability occurs in the administrative messaging functionality exposed by /admin/message.php in SUP Online Shopping 1.0.
It is present when user-controlled input from the seenid HTTP parameter is incorporated into SQL statements without robust input validation, escaping, or the use of prepared statements.
The issue is typically reachable via standard web requests to the admin interface where the parameter is used to fetch or update message-related records in the database.
Exploit preconditions
- Attack surface: HTTP(S) requests to the /admin/message.php endpoint of the SUP Online Shopping application.
- Required access: Ability to send crafted requests to the affected endpoint; in many deployments this is limited to authenticated admin or staff users, but in some misconfigurations it may be reachable more broadly.
- Trigger point: The server-side code reads the seenid parameter from the request and concatenates it into an SQL query at runtime.
- Why exploitation is possible: The application constructs SQL queries using string concatenation or equivalent unsafe interpolation, failing to enforce proper neutralization of special characters or use parameterized queries, allowing attacker-controlled input to modify the intended SQL command.
Why this happens
This issue stems from insecure construction of SQL queries based on untrusted input, aligning with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Instead of using bound parameters or a query builder that separates code from data, the application likely incorporates the seenid parameter directly into the WHERE clause (or comparable segment) of a query.
Additionally, insufficient output encoding or input validation related to database identifiers and values (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component) enables crafted payloads to escape the intended query structure and inject new SQL fragments.
Potential impact
- May allow attackers to read sensitive database contents, including user information or order data.
- Could enable modification or deletion of records, impacting data integrity (e.g., tampering with messages, user accounts, or order records).
- Can permit creation or elevation of application accounts, potentially leading to full administrative takeover of the web application.
- Might be leveraged to execute database-specific functions, potentially aiding in further compromise of the underlying host depending on DBMS features and configuration.
General mitigation guidance
Effective mitigation focuses on separating SQL code from data and reducing trust in user input:
- Use parameterized queries or prepared statements for all database operations involving user-supplied input, ensuring that the database driver treats the seenid value strictly as data.
- Employ a vetted database abstraction layer or ORM that encourages safe query building patterns and discourages raw string concatenation.
- Apply strict server-side validation and type enforcement on identifiers and numeric parameters (e.g., ensuring seenid is an integer and rejecting or normalizing unexpected input).
- Minimize database privileges of the application account so that, even if injection is attempted, the account cannot perform high-impact operations beyond its legitimate role.
- Adopt secure-by-default coding standards and code review checklists that prohibit ad hoc SQL construction from request parameters.
How teams detect issues like this
Organizations can uncover and monitor this class of issue through multiple complementary approaches:
- Static analysis: Configure SAST tools or linters to flag direct concatenation of request parameters into SQL strings and to enforce the use of parameterized APIs in PHP or the language/framework used.
- Code review: During manual reviews, look for patterns where $_GET, $_POST, or equivalent request values flow directly into query-building functions, especially in admin-related scripts like /admin/message.php.
- Dynamic testing: Use web application scanners, fuzzers, or security testing tools to send typical SQL injection payloads through parameters such as seenid and observe for database errors or anomalous responses.
- Runtime monitoring: Enable database and application logging to detect suspicious query patterns, such as unexpected UNION, OR 1=1, or stacked queries, and correlate them with incoming HTTP requests for incident response.

