/

CVE-2026-35152

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in Apache Fineract Reports API

CVE-2026-35152

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Data Access and Query Manipulation

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL Injection vulnerability in Apache Fineract's report execution API allows crafted report parameters to be embedded directly into dynamically generated SQL queries without adequate validation.

An authenticated user with permission to run reports can abuse this behavior to inject arbitrary SQL, potentially accessing or manipulating data beyond the scope of the intended report.

Affected context

The vulnerability occurs in Apache Fineract deployments that expose the report execution (runreports) API and rely on dynamic SQL generation based on user-provided report parameters.

It is relevant where:

  • Report definitions are translated into SQL at runtime
  • User-supplied parameter values are concatenated or interpolated into SQL strings
  • The system trusts authenticated report runners without enforcing strict parameter validation or binding

Exploit preconditions

  • Attack surface: HTTP-based Report Execution API (runreports endpoint)
  • Required access: Authenticated access with permissions to execute reports
  • Trigger point: Submission of specially crafted parameter values in report requests
  • Why exploitation is possible: Parameters are incorporated into SQL without robust validation or parameterized binding, allowing attacker-controlled input to alter the structure and behavior of the resulting query

Why this happens

The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

In the affected report execution flow, user-supplied parameter values are treated as trusted input and embedded directly into SQL statements, often via string concatenation or unescaped interpolation.

Without proper neutralization or the use of prepared statements with bound parameters, the database interprets parts of the user input as executable SQL syntax, enabling attackers to extend or modify queries beyond their intended structure.

Potential impact

  • Unauthorized access to sensitive data outside of the designed report scope
  • Reading records from tables not normally exposed through the reporting interface
  • Manipulation or deletion of data if write-capable SQL statements can be injected
  • Bypassing business logic or multi-tenant isolation enforced at the application layer
  • Discovery of schema details that can facilitate further attacks

General mitigation guidance

Effective mitigation for SQL Injection focuses on eliminating direct concatenation of user input into SQL and narrowing trust boundaries around report parameters.

Recommended secure patterns include:

  • Using parameterized queries or prepared statements for all report-related SQL, binding parameters rather than interpolating them into query strings
  • Applying strict server-side validation and type enforcement for report parameters (e.g., numeric ranges, enumerated values, and structured filters)
  • Designing report definitions so that end users select from predefined filters rather than composing free-form SQL fragments
  • Implementing least-privilege database accounts for report execution, restricting accessible tables and operations to the minimal necessary subset
  • Centralizing query-building logic to enforce consistent sanitization and access control policies across all reports

How teams detect issues like this

Organizations can detect and manage SQL Injection risks in reporting APIs through:

  • Static analysis rules that flag dynamic SQL construction involving user-controlled input (e.g., string concatenation, unescaped interpolation)
  • Code reviews focused on report generation paths, ensuring use of parameterized queries and clear separation between SQL templates and user data
  • Security testing that probes report parameters with injection patterns to identify unsafe query behavior, including error-based and time-based probes
  • Logging and monitoring of unusual report queries (e.g., unexpected table access, abnormal query complexity) to spot potential abuse
  • Policy enforcement in CI/CD pipelines requiring secure database access patterns and rejecting changes that introduce unparameterized SQL

Sources

SourceLink
github.comgithub.com/apache/fineract/pull/5980
lists.apache.orglists.apache.org/thread/658yddn0bpxqw2hpxnyk3vqd05bkchg9
lists.apache.orglists.apache.org/thread/d3bzcwsbywz7wg9zxvtlkvgmffqjyfn0
openwall.comopenwall.com/lists/oss-security/2026/07/15/1

Frequently asked

questions

Exploitation is limited to authenticated users who can run reports, but within that scope it can significantly expand their effective access to data by altering the underlying SQL queries.

The attacker must have valid credentials and sufficient permissions to access the report execution API and run one or more reports. No direct database credentials are required; exploitation happens through the application layer.

The safest pattern is to remove all direct concatenation of parameter values into SQL and rely exclusively on prepared statements with bound parameters, combined with strict validation and whitelisting of allowable parameter values for each report.

Establish secure coding standards that mandate parameterized queries for all database interactions, incorporate automated checks for dynamic SQL, and design reporting features around predefined filters and schemas rather than flexible, user-composed query fragments.

Find out what's already
exploitable in your codebase.