Summary
SuiteCRM contains a SQL injection vulnerability in its Campaign ROI handling, where request input can reach a database query despite normal quote encoding. An authenticated user with Campaigns access may exploit this behavior to infer data from database tables through time-based blind SQL injection.
SuiteCRM contains a SQL injection vulnerability in its Campaign ROI handling, where request input can reach a database query despite normal quote encoding. An authenticated user with Campaigns access may exploit this behavior to infer data from database tables through time-based blind SQL injection.
Affected context
The issue occurs in modules/Campaigns/PopupCampaignRoi.php, where the id request parameter is interpolated into SQL. In affected versions, a particular interaction between input prefixed with an XSS payload and the securexss()/AntiXSS processing can allow a literal quote to reach the query. Exploitation requires an authenticated user with Campaigns access and a reachable vulnerable code path.
The issue occurs in modules/Campaigns/PopupCampaignRoi.php, where the id request parameter is interpolated into SQL. In affected versions, a particular interaction between input prefixed with an XSS payload and the securexss()/AntiXSS processing can allow a literal quote to reach the query. Exploitation requires an authenticated user with Campaigns access and a reachable vulnerable code path.
Exploit preconditions
- Attack surface: The Campaign ROI functionality that invokes
PopupCampaignRoi.php - Required access: An authenticated account with Campaigns access
- Trigger point: Processing the request's
idvalue in the SQL query - Why exploitation is possible: Input processing may select a string that retains a quote, allowing request data to alter SQL query structure
- Attack surface: The Campaign ROI functionality that invokes
PopupCampaignRoi.php - Required access: An authenticated account with Campaigns access
- Trigger point: Processing the request's
idvalue in the SQL query - Why exploitation is possible: Input processing may select a string that retains a quote, allowing request data to alter SQL query structure
Why this happens
The application incorporates request-controlled data into SQL rather than ensuring that the value is treated strictly as data. The input sanitization behavior does not reliably prevent a quote from reaching the query in this code path. This is CWE-89: SQL Injection, an input-neutralization failure that can let untrusted data change the meaning of a database command.
The application incorporates request-controlled data into SQL rather than ensuring that the value is treated strictly as data. The input sanitization behavior does not reliably prevent a quote from reaching the query in this code path. This is CWE-89: SQL Injection, an input-neutralization failure that can let untrusted data change the meaning of a database command.
Potential impact
- An attacker may infer database contents through timing differences.
- Sensitive information in accessible database tables could be exposed.
- Depending on database permissions and query behavior, data integrity could be affected.
- The vulnerability could increase the risk of broader application or customer-data compromise.
- An attacker may infer database contents through timing differences.
- Sensitive information in accessible database tables could be exposed.
- Depending on database permissions and query behavior, data integrity could be affected.
- The vulnerability could increase the risk of broader application or customer-data compromise.
General mitigation guidance
Defensive approaches generally focus on separating data from SQL syntax and limiting the consequences of a query flaw.
- Use parameterized queries or prepared statements for request-derived values.
- Treat request parameters as untrusted and validate them against the expected type and format.
- Avoid relying on output-encoding or general-purpose sanitization functions as SQL defenses.
- Apply least-privilege database permissions and restrict access to tables and operations the application requires.
- Centralize query construction patterns so security controls are consistent across code paths.
Defensive approaches generally focus on separating data from SQL syntax and limiting the consequences of a query flaw.
- Use parameterized queries or prepared statements for request-derived values.
- Treat request parameters as untrusted and validate them against the expected type and format.
- Avoid relying on output-encoding or general-purpose sanitization functions as SQL defenses.
- Apply least-privilege database permissions and restrict access to tables and operations the application requires.
- Centralize query construction patterns so security controls are consistent across code paths.
How teams detect issues like this
Review database access code for request parameters, including id values, concatenated or interpolated into SQL. Static analysis can flag dynamic query construction and verify that user-controlled values reach parameterized query APIs. Code reviews can examine whether sanitization is being mistaken for SQL parameterization and whether database accounts have unnecessarily broad permissions. CI policies can require parameterized queries for application database access.
Review database access code for request parameters, including id values, concatenated or interpolated into SQL. Static analysis can flag dynamic query construction and verify that user-controlled values reach parameterized query APIs. Code reviews can examine whether sanitization is being mistaken for SQL parameterization and whether database accounts have unnecessarily broad permissions. CI policies can require parameterized queries for application database access.

