Summary
SuiteCRM contains a SQL injection vulnerability in the Cases knowledge-base article search action. A low-privileged user with access to the Cases module may be able to exploit the search input to perform blind SQL injection and extract sensitive database information.
SuiteCRM contains a SQL injection vulnerability in the Cases knowledge-base article search action. A low-privileged user with access to the Cases module may be able to exploit the search input to perform blind SQL injection and extract sensitive database information.
Affected context
The issue affects the CasesController action_get_kb_articles action in SuiteCRM versions before 7.15.2 and 8.10.2. The action incorporates the submitted search value into SQL expressions, including a CASE WHEN ... LIKE expression and a WHERE clause. Risk arises when crafted input reaches those expressions without effective SQL parameterization.
The issue affects the CasesController action_get_kb_articles action in SuiteCRM versions before 7.15.2 and 8.10.2. The action incorporates the submitted search value into SQL expressions, including a CASE WHEN ... LIKE expression and a WHERE clause. Risk arises when crafted input reaches those expressions without effective SQL parameterization.
Exploit preconditions
- Attack surface: The Cases knowledge-base article search action
- Required access: A low-privileged account with Cases module access
- Trigger point: Processing the submitted
searchvalue - Why exploitation is possible: Input can reach SQL expressions in a form that allows a quote to affect query structure, enabling blind SQL injection
- Attack surface: The Cases knowledge-base article search action
- Required access: A low-privileged account with Cases module access
- Trigger point: Processing the submitted
searchvalue - Why exploitation is possible: Input can reach SQL expressions in a form that allows a quote to affect query structure, enabling blind SQL injection
Why this happens
The action interpolates user-controlled $_POST['search'] data into SQL rather than consistently separating data from query syntax. Although securexss() normally entity-encodes quotes, the described AntiXSS processing can select a processed string instead of the encoded backup when the input is prefixed with an XSS payload. This can allow a literal quote to reach the query. The underlying flaw is CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
The action interpolates user-controlled $_POST['search'] data into SQL rather than consistently separating data from query syntax. Although securexss() normally entity-encodes quotes, the described AntiXSS processing can select a processed string instead of the encoded backup when the input is prefixed with an XSS payload. This can allow a literal quote to reach the query. The underlying flaw is CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Potential impact
- An attacker may be able to infer and extract sensitive information from the database through blind SQL injection.
- Exposed information could include CRM records, depending on database contents and application permissions.
- Disclosure of sensitive records could lead to privacy, regulatory, or business impacts.
- An attacker may be able to infer and extract sensitive information from the database through blind SQL injection.
- Exposed information could include CRM records, depending on database contents and application permissions.
- Disclosure of sensitive records could lead to privacy, regulatory, or business impacts.
General mitigation guidance
Defensive patterns include using parameterized queries or prepared statements so user input cannot alter SQL structure. Treat search values as untrusted regardless of prior XSS filtering, and keep output encoding separate from SQL-injection defenses. Where dynamic query fragments are necessary, constrain them to allowlisted values. Limit database and application privileges to what the CRM functionality requires, and ensure validation occurs before values are used in query construction.
Defensive patterns include using parameterized queries or prepared statements so user input cannot alter SQL structure. Treat search values as untrusted regardless of prior XSS filtering, and keep output encoding separate from SQL-injection defenses. Where dynamic query fragments are necessary, constrain them to allowlisted values. Limit database and application privileges to what the CRM functionality requires, and ensure validation occurs before values are used in query construction.
How teams detect issues like this
- Use static analysis to identify SQL statements built through interpolation or concatenation of request data.
- Review controller actions and ORM query construction for search parameters used in
CASE,LIKE, orWHEREexpressions. - Apply code-review checks and CI policies requiring parameterized queries for user-controlled values.
- Monitor application and database logs for unusual search patterns, query errors, or repeated probing behavior.
- Use static analysis to identify SQL statements built through interpolation or concatenation of request data.
- Review controller actions and ORM query construction for search parameters used in
CASE,LIKE, orWHEREexpressions. - Apply code-review checks and CI policies requiring parameterized queries for user-controlled values.
- Monitor application and database logs for unusual search patterns, query errors, or repeated probing behavior.

