Summary
Apache Fineract's center and datatable read endpoints incorporate caller-supplied ordering parameters into SQL queries without reliably preventing SQL injection. An authenticated user with read access to the relevant endpoint may be able to use time-based blind injection to infer information from the database.
Affected context
The issue affects Apache Fineract versions up to and including 1.15.0 in the center read endpoint and datatable entry read endpoints. It occurs when caller-supplied ordering parameters are used to construct SQL ORDER BY clauses; regex-based validation may not reject all malicious input.
Exploit preconditions
- Attack surface: The center or datatable read API endpoints
- Required access: An authenticated account with read access to centers or the targeted datatable
- Trigger point: Processing of caller-supplied
orderBy,sortOrder, ororderparameters - Why exploitation is possible: Ordering values are concatenated into SQL, and existing regex validation can be bypassed
Why this happens
The application constructs SQL ORDER BY clauses by concatenating caller-controlled ordering parameters. Regex-based checks do not reliably constrain these values before query construction, allowing SQL syntax to be interpreted as part of the query. This is CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Potential impact
- An attacker could use time-based responses to infer database information
- Sensitive data accessible to the application account may be exposed
- Depending on database permissions and query behavior, database integrity or availability could be affected
General mitigation guidance
Mitigation generally focuses on preventing untrusted values from becoming SQL syntax.
Common defensive patterns include:
- Use parameterized queries where supported and avoid constructing SQL from caller input
- Map ordering options to a fixed allowlist of known column names and directions
- Validate inputs against explicit, narrow schemas rather than relying on regex checks alone
- Apply least-privilege permissions to database accounts used by the application
- Keep database errors and timing behavior from revealing unnecessary information
How teams detect issues like this
High-level detection approaches include:
- Static analysis for SQL strings assembled through concatenation with request parameters
- Code review of sorting and ordering logic in API read endpoints
- Checks that ordering fields and directions are selected from strict allowlists
- Testing and policy enforcement to flag dynamic SQL construction without safe validation
Automated code review tools may help identify these patterns.

