Daptin SQL Injection Vulnerability in Aggregate API
A SQL injection vulnerability exists in Daptin versions prior to 0.11.4 within the `/aggregate/:typename` endpoint, where the `column` and `group` query parameters are passed to `goqu.L()` without validation, allowing authenticated users to inject arbitrary SQL expressions and exfiltrate sensitive data.
Daptin versions prior to 0.11.4 are susceptible to a SQL injection vulnerability in the /aggregate/:typename endpoint. The vulnerability arises because the application fails to properly validate the column and group query parameters before passing them to goqu.L(). This function is used to build raw SQL literal expressions, thus bypassing parameterization and allowing attackers to inject arbitrary SQL code. Any authenticated user, regardless of privilege level, can exploit this vulnerability. This poses a significant risk as it enables unauthorized data extraction, disclosure of database internals, and cross-table data exfiltration. The vulnerability was reported on 2026-04-22 and assigned CVE-2026-41422.
Attack Chain
- An attacker authenticates to the Daptin application with valid credentials.
- The attacker crafts a malicious HTTP GET request targeting the
/aggregate/:typenameendpoint. - The attacker injects a SQL payload into the
columnorgroupquery parameters. For example,column=(SELECT group_concat(email) FROM user_account) as leak. - The Daptin application receives the request and passes the unvalidated
columnparameter to thegoqu.L()function inserver/resource/resource_aggregate.go. - The
goqu.L()function constructs a raw SQL query using the attacker-controlled input, bypassing any parameterization. - The malicious SQL query is executed against the database.
- The attacker retrieves the injected SQL query’s result from the application’s response, which contains sensitive data.
- The attacker exfiltrates the extracted data, potentially including user credentials, internal database schema details, or other confidential information.
Impact
Successful exploitation of this SQL injection vulnerability allows attackers to perform unauthorized data extraction, including sensitive information like user credentials. An attacker can also disclose database internals and exfiltrate data from multiple tables, even with low-privilege access. The impact includes potential data breaches, compliance violations, and reputational damage. The vulnerability was confirmed to allow extraction of user_account.email values by a non-admin user.
Recommendation
- Upgrade Daptin to version 0.11.4 or later to patch the SQL injection vulnerability (CVE-2026-41422).
- Deploy the provided Sigma rule
Detect Daptin Aggregate API SQL Injectionto identify exploitation attempts in web server logs. - If upgrading is not immediately feasible, implement input validation on the
columnandgroupparameters in the/aggregate/:typenameendpoint, specifically blocking SQL keywords and functions to mitigate the risk.
Detection coverage 2
Detect Daptin Aggregate API SQL Injection
highDetects potential SQL injection attempts in Daptin's `/aggregate/:typename` endpoint by identifying suspicious SQL syntax within the `column` or `group` query parameters.
Detect Daptin Aggregate API Database Schema Disclosure
highDetects attempts to disclose database schema in Daptin's `/aggregate/:typename` endpoint using sqlite_master.
Detection queries are kept inside the platform. Get full rules →