Summary
Projectworlds Online Art Gallery Shop 1.0 contains a SQL injection flaw in /admin/adminHome.php, where the reach_nm parameter is incorporated into database queries without proper sanitization.
A remote attacker can manipulate this parameter to interfere with SQL query logic, which may allow data access, modification, or other unauthorized database actions under typical configurations.
Affected context
The vulnerability occurs in the admin section of the Online Art Gallery Shop 1.0 application, specifically within /admin/adminHome.php when handling the reach_nm parameter.
It is relevant in deployments where user-controlled input is passed directly or indirectly into SQL queries without sufficient validation or parameterization.
The risk is higher if the affected admin page is reachable over the network and if the underlying database account has broad privileges over application data.
Exploit preconditions
- Attack surface: HTTP(S) requests targeting /admin/adminHome.php
- Required access: Network access to the vulnerable endpoint; additional app-level authentication may or may not be required depending on configuration
- Trigger point: Supplying crafted values in the reach_nm request parameter that are incorporated into SQL queries
- Why exploitation is possible: The application appears to concatenate the reach_nm parameter directly into SQL statements, without using parameterized queries or robust input validation, allowing control over query structure
Why this happens
The underlying issue is a classic SQL injection pattern where untrusted input is incorporated into SQL statements without proper separation between data and code.
By treating the reach_nm parameter as part of the query text rather than as a bound parameter, the application allows an attacker to inject additional SQL operators, predicates, or statements.
This behavior maps primarily 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 Used by a Downstream Component, since the tainted input flows into the database engine as a downstream consumer.
Potential impact
- Retrieval of sensitive data that the database account can read, including user records or business information
- Modification or deletion of data via injected UPDATE, INSERT, or DELETE operations
- Bypassing application-level authorization checks by tampering with WHERE clauses or logic
- Creation of new accounts or alteration of existing accounts stored in the database
- In some environments, potential execution of database-specific commands that may aid further compromise
General mitigation guidance
Effective mitigation generally focuses on eliminating direct string concatenation in database queries and constraining the power of the database user.
Common defensive patterns include:
- Using parameterized queries or prepared statements for all database access, ensuring user data is always bound as parameters
- Applying strict server-side validation and allowlists for parameters like reach_nm, limiting them to expected formats and values
- Centralizing database access through vetted data access layers rather than constructing queries inline in page controllers
- Enforcing least-privilege on the database user account so that, even if a query is abused, its impact is limited
- Applying consistent output encoding and escaping only as a secondary layer, not as a replacement for parameterization
How teams detect issues like this
Organizations can detect similar SQL injection risks using multiple approaches:
- Static code analysis to flag dynamic SQL construction that incorporates raw request parameters, especially in files like adminHome.php
- Manual code review focused on data flow from HTTP request variables (e.g., $_GET, $_POST) into database APIs without prepared statements
- Runtime application security testing, including fuzzing input parameters such as reach_nm for error-based or time-based anomalies
- Database monitoring and logging policies that alert on unusual query patterns, concatenated query fragments, or syntax errors indicating injection attempts
- Incorporation of web application firewalls (WAFs) or similar request filters that can flag or block obviously malicious SQL payload patterns, as an additional layer

