Summary
MuuCMF T6 v1.9.4.20260115 contains an SQL injection vulnerability in the /index/controller/Search.php endpoint, where the keyword parameter is unsafely incorporated into database queries.
An unauthenticated attacker can exploit this flaw to manipulate SQL queries, potentially compromising the entire database, escalating to administrative access, and in some deployments achieving remote code execution by writing malicious files to the server.
Affected context
The vulnerability occurs in MuuCMF T6 v1.9.4.20260115 installations that expose the /index/controller/Search.php endpoint to untrusted clients.
It is relevant where the keyword query parameter is bound directly into SQL statements without strict validation or parameterization.
This issue is most impactful when the database account used by the application has broad privileges (such as write access to application tables or file system-related functions) and when error messages or query responses are observable to the attacker.
Exploit preconditions
- Attack surface: Public-facing web interface via the
/index/controller/Search.phpendpoint. - Required access: No prior authentication; anonymous HTTP access is sufficient.
- Trigger point: Supplying crafted input in the
keywordparameter that is processed by the search functionality. - Why exploitation is possible: User-controlled data is concatenated or interpolated into SQL queries without proper parameterization or escaping, allowing attackers to alter the intended query logic.
Why this happens
This vulnerability stems from building SQL queries by directly embedding the keyword parameter into query strings instead of using parameterized statements or a safe query builder.
When untrusted input is incorporated into SQL commands without adequate validation or binding, attackers can inject additional SQL syntax, modify predicates, union arbitrary result sets, or invoke database-specific functions.
This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the application fails to distinguish between data and control instructions in SQL.
Potential impact
- Full read access to database contents, including potentially sensitive user data and configuration.
- Unauthorized modification or deletion of database records.
- Escalation to administrative access by altering credentials, roles, or permission tables.
- Execution of database-specific functions that may allow writing arbitrary files to the server's file system.
- Potential remote code execution in environments where the database or application can write executable content to web-accessible directories.
General mitigation guidance
Effective mitigation generally focuses on treating all external input as untrusted and strictly separating data from SQL command syntax.
Common defensive patterns include:
- Using parameterized queries (prepared statements) or ORM query builders that automatically bind variables rather than interpolating them into SQL strings.
- Applying strict input validation and normalization for search parameters, allowing only expected character sets and formats.
- Employing least-privilege principles for the database account, limiting access to only the necessary tables and prohibiting dangerous functions such as file write operations where possible.
- Centralizing data access logic so that query construction follows consistent, secure patterns instead of ad hoc string concatenation.
- Implementing generic error handling that avoids exposing detailed SQL errors or stack traces to clients, thereby reducing feedback for attackers.
How teams detect issues like this
Detection efforts can combine code-level analysis with runtime monitoring:
- Static analysis rules targeting string-built SQL queries, especially those that directly embed request parameters like
$_GET,$_POST, or framework equivalents. - Manual code review that flags dynamic query construction in controller and model layers, checking for missing parameter binding or improper escaping.
- Security testing and fuzzing of the
/index/controller/Search.phpendpoint using automated scanners configured to probe for SQL injection patterns. - Centralized logging of database errors and anomalous query patterns (e.g., unexpected UNION clauses, tautological conditions, or syntax errors tied to external inputs) and alerting on suspicious behavior.
- Incorporating web application firewalls or API gateways with rules tuned to identify and block common SQL injection payload signatures, as a compensating control.

