Описание
Pimcore Vulnerable to SQL Injection in Custom Reports Column Configuration
Summary
The columnConfigAction endpoint in the CustomReportsBundle is vulnerable to SQL injection. An attacker with the reports_config permission can supply a malicious SQL configuration that is concatenated into a query and executed. Although the application attempts to filter certain DDL/DML keywords (like UPDATE, DELETE, DROP), it fails to prevent arbitrary SELECT queries, UNION statements, or the use of dangerous database functions. Furthermore, because the application returns database error messages in the JSON response, an attacker can easily exfiltrate data using error-based SQL injection techniques.
Affected scope
bundles/CustomReportsBundle/src/Controller/Reports/CustomReportController.php CustomReportController:columnConfigAction -> SqlAdapter::getColumns -> SqlAdapter::buildQueryString -> Db::fetchAssociative()
PoC
- Download and install the version Pimcore <=12.3.3 (latest)
- Login using Admin account or any account that has reports_config permission
- Navigate to custom reports
- Capture the request using burp suite and perform SQLi attack as the following
- Get Database username
- Get Database name
- Get Tables names Note: Update the limit parameter to iterate around the tables queries like limit 0,1 limit 1,1 , limit 2,1 ..etc
- Bypass the implemented Regex and perform SQL updat eto for exmaple update the admin username
Impact
By exploiting this vulneability any user with custom-report access could manipuate and crawl the database information and also bypass the application filters to Update,insert or delete database tables, which impact on the application confidentiality ,intergrity and service availability
Пакеты
pimcore/pimcore
>= 2026.1.0, < 2026.1.2
2026.1.2
pimcore/pimcore
<= 11.5.16
11.5.17
pimcore/pimcore
>= 12.0.0-RC1, <= 12.3.5
12.3.6
Связанные уязвимости
Pimcore is an Open Source Data & Experience Management Platform. Prior to 11.5.17 (LTS) and 12.3.6, the columnConfigAction endpoint in bundles/CustomReportsBundle/src/Controller/Reports/CustomReportController.php passes malicious SQL configuration through CustomReportController:columnConfigAction, SqlAdapter::getColumns, SqlAdapter::buildQueryString, and Db::fetchAssociative(), allowing an attacker with the reports_config permission to use arbitrary SELECT queries, UNION statements, dangerous database functions, and error-based SQL injection to exfiltrate or manipulate database data. This issue is fixed in versions 11.5.17 (LTS) and 12.3.6.