Summary
AdminNeo's search handling can pass crafted IN and NOT IN values to SQL without escaping them. If an attacker induces a logged-in user to follow a crafted GET link, the resulting blind SQL injection may allow database actions within that user's database privileges.
Affected context
The issue is described in AdminNeo versions before 5.9.1, in search handling where process_length() processes IN and NOT IN values without escaping them. The risk arises when the application accepts a crafted search request from a logged-in user and constructs a database query from those values. The description identifies PostgreSQL, SQLite, MS SQL, Oracle, and MySQL in NO_BACKSLASH_ESCAPES mode as affected database contexts.
Exploit preconditions
- Attack surface: The AdminNeo search functionality, accessed through a GET request.
- Required access: The attacker must be able to induce a logged-in user to visit a crafted link; the resulting query uses that user's database rights.
- Trigger point: Processing of crafted
INorNOT INsearch values byprocess_length(). - Why exploitation is possible: Search values are passed into SQL without adequate escaping, allowing SQL syntax to be interpreted as part of the query.
Why this happens
The underlying bug is improper neutralization of special elements in SQL commands, mapping to CWE-89: SQL Injection. Search input is incorporated into a database query without reliable parameterization or context-appropriate handling. As a result, crafted values may change the query's meaning.
Potential impact
- An attacker could infer information from the database through blind SQL behavior.
- Database records may be read or altered within the privileges available to the application's database account.
- The integrity or availability of database-backed features could be affected.
- The scope of any resulting impact may depend on database permissions and the data accessible to the application.
General mitigation guidance
Common defensive patterns include:
- Using parameterized queries for all user-controlled values, including search filters and list membership conditions.
- Validating filter structure and value types against a strict allowlist before query construction.
- Avoiding manual escaping as a substitute for query parameterization.
- Applying least privilege to database accounts so the application can access only the data and operations it requires.
- Reducing trust in cross-site requests with appropriate request protections and requiring deliberate user actions for sensitive operations.
How teams detect issues like this
- Use static analysis to identify SQL construction involving concatenated or interpolated request values.
- Review search and filter code paths, especially handling of
INandNOT INvalues and helper functions such asprocess_length(). - Check that database access consistently uses parameterized queries across supported database engines.
- Enforce code-review or CI policies that flag raw SQL construction from user-controlled input and require documented exceptions.

