Summary
Open ISES Tickets before 3.44.2 contains a SQL injection vulnerability in ajax/sit_incidents.php, where the offset GET parameter is directly concatenated into the LIMIT clause of a SELECT query without sanitization.
An authenticated attacker can manipulate this parameter to alter SQL query semantics, which can lead to reading, modifying, or destroying database contents under certain configurations.
Affected context
The vulnerability occurs in the AJAX incident listing functionality implemented in ajax/sit_incidents.php within Open ISES Tickets.
It is triggered when the application constructs a database query that includes a LIMIT clause based on the user-controlled offset GET parameter.
In affected deployments, the application does not robustly validate or parameterize this value before embedding it into the SQL statement, creating an injection point tied to pagination or listing behavior.
Exploit preconditions
- Attack surface: HTTP(S) requests to the Open ISES Tickets web interface, specifically calls to
ajax/sit_incidents.php. - Required access: Valid authenticated user account with permissions to access the incidents listing endpoint.
- Trigger point: Supplying a crafted
offsetvalue in the query string (e.g.,?offset=...) that is processed into theLIMITclause of a SQL SELECT statement. - Why exploitation is possible: The
offsetparameter is concatenated directly into SQL without proper parameter binding, type enforcement, or escaping, allowing an attacker-controlled fragment to influence the structure of the query.
Why this happens
This issue is a classic instance of CWE-89: SQL Injection, where user input is incorporated into SQL statements without adequate separation between data and code.
The implementation appears to construct the SELECT query string by string-concatenating the offset GET parameter into the LIMIT clause, treating a user-supplied value as part of the query syntax instead of a bound parameter.
Because there is no strict numeric casting or use of prepared statements for this pagination value, an attacker can inject additional SQL tokens to modify the query's behavior, potentially affecting which rows are returned, updated, or deleted.
Potential impact
- An attacker may retrieve additional or sensitive rows from the incidents or related tables beyond what their role would normally permit.
- An attacker could modify or delete database records if the injected SQL is executed in a context with write privileges.
- The integrity of ticketing and incident data can be compromised, leading to falsified records, hidden incidents, or tampered audit trails.
- In certain database configurations, chained queries or stacked statements (if allowed) could enable broader manipulation of the underlying schema or other application data.
General mitigation guidance
Effective mitigation focuses on enforcing strict separation between user input and SQL command structure, especially for pagination and LIMIT/OFFSET parameters.
Recommended defensive patterns include:
- Using parameterized queries or prepared statements for all dynamic values, including those in LIMIT and OFFSET clauses where supported by the database driver.
- Enforcing strict type validation (e.g., integer casting and range checks) on pagination parameters before they reach the data access layer.
- Centralizing query-building logic so that SQL strings are not assembled with direct string concatenation of request parameters.
- Applying least-privilege principles to the database account used by the application, ensuring it has only the minimal read/write capabilities required.
- Implementing an application-wide input validation strategy that treats all client-supplied values as untrusted, even for seemingly harmless numeric parameters.
How teams detect issues like this
Organizations can detect this type of issue using a combination of code-centric and runtime-focused approaches:
- Static analysis: Configure SAST tools or linters to flag concatenation of
$_GET,$_POST, or similar request variables into SQL query strings, especially around LIMIT/OFFSET clauses. - Code review: During manual review, look for data access code in
ajax/sit_incidents.php(and similar endpoints) that builds SQL with string interpolation instead of bound parameters; pay special attention to pagination and filtering logic. - Security testing: Use dynamic application security testing (DAST) to send crafted numeric parameters and observe for SQL-related errors, anomalies in result sets, or database error messages.
- Policy enforcement: Adopt coding guidelines that mandate prepared statements and numeric casting for all database-bound user inputs, and enforce them with pre-commit hooks or CI checks.

