Summary
Online Art Gallery Shop 1.0 contains a SQL injection vulnerability in the /admin/adminHome.php script, where the Info parameter is used in database queries without proper input neutralization.
A remote attacker can craft malicious requests to manipulate SQL queries, potentially accessing, modifying, or deleting backend data, especially when the application runs with high-privileged database credentials.
Affected context
The vulnerability occurs in the administrative area of the Online Art Gallery Shop 1.0 application, specifically in /admin/adminHome.php where the Info parameter is processed.
It arises when user-controlled data is concatenated into SQL statements without robust validation, escaping, or parameterization.
The risk is higher when the admin interface is exposed to the internet, access controls are weak, or credentials are compromised, allowing direct interaction with the vulnerable parameter.
Exploit preconditions
- Attack surface: HTTP(S) endpoint at /admin/adminHome.php
- Required access: Ability to send requests to the admin interface (via direct admin access, compromised admin accounts, weak authentication, or exposed endpoint)
- Trigger point: Supplying crafted values in the Info parameter that are incorporated into SQL queries
- Why exploitation is possible: The application directly embeds the Info parameter into SQL statements without parameterization or sufficient neutralization, matching CWE-89 and CWE-74 patterns
Why this happens
The core issue is the construction of SQL queries using string concatenation with untrusted input from the Info argument in adminHome.php.
Instead of using prepared statements with bound parameters, the code likely builds SQL fragments dynamically and passes them directly to the database, enabling injection of control characters, operators, and additional clauses.
This reflects CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) and is conceptually related to CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), where untrusted data is sent to the database without adequate sanitization.
Potential impact
- Unauthorized reading of sensitive data (e.g., customers, orders, payment-related metadata)
- Modification or deletion of database records, including product listings or user accounts
- Authentication bypass by manipulating login or session-related queries
- Escalation of privileges within the application if role or permission data is stored in the database
- In extreme cases, potential execution of database-specific commands that can impact server availability or integrity
General mitigation guidance
Effective mitigation focuses on separating data from code in all database operations:
- Use parameterized queries / prepared statements for every interaction involving user input, including the Info parameter
- Apply central input validation to constrain Info to expected formats, types, and value ranges
- Avoid dynamic SQL string building with concatenation; if unavoidable, strictly whitelist allowed values and clauses
- Run the application with least-privilege database accounts, limiting the impact of a successful injection
- Implement defense-in-depth controls such as web application firewalls (WAF) tuned to detect and block SQL injection patterns
How teams detect issues like this
Organizations can detect this class of vulnerability using multiple approaches:
- Static application security testing (SAST) rules that flag SQL queries built with string concatenation and untrusted variables (e.g., references to $_GET/$_POST/$_REQUEST mapped into SQL)
- Manual code review focusing on database access layers, checking that all queries in adminHome.php use parameter binding
- Dynamic application security testing (DAST) and fuzzing that inject common SQL metacharacters and payloads into the Info parameter to observe anomalous responses
- Runtime monitoring and logging of unusual SQL query patterns, including unexpected concatenations, tautologies, or stacked statements where supported

