/

CVE-2026-44739

Severity:

HIGH RISK

(8.7)

SQL Injection (CWE-89) in Pimcore Custom Reports

CVE-2026-44739

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Data Access and Manipulation

Severity:

HIGH RISK

(8.7)

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

Pimcore's Custom Reports columnConfigAction endpoint allows user-controlled SQL fragments to flow into query construction without adequate validation.

An attacker with the reports_config permission can craft arbitrary SELECT and UNION queries, invoke dangerous database functions, and leverage error-based SQL injection to read or manipulate backend data across the Pimcore database.

Affected context

This vulnerability appears in Pimcore installations that use the Custom Reports Bundle and expose the columnConfigAction endpoint to users with the reports_config permission.

It manifests when report configurations permit direct inclusion of SQL snippets that are concatenated into query strings rather than being constrained to parameterized, pre-defined queries.

Environments where database accounts used by Pimcore have broad read or write privileges are more susceptible to impactful exploitation.

Exploit preconditions

  • Attack surface: HTTP requests targeting the Custom Reports columnConfigAction endpoint.
  • Required access: Valid Pimcore account with the reports_config permission or any role capable of defining or editing custom report SQL configuration.
  • Trigger point: Submission or modification of report configurations that include crafted SQL segments, which flow through CustomReportController::columnConfigAction, SqlAdapter::getColumns, SqlAdapter::buildQueryString, and Db::fetchAssociative().
  • Why exploitation is possible: User-controlled SQL strings are incorporated directly into the query without robust parameterization or syntactic restrictions, enabling arbitrary SELECT, UNION operations, function calls, and error-based SQL injection.

Why this happens

The underlying bug class is classic SQL injection as captured by CWE-89, where untrusted input is integrated into SQL statements without proper neutralization.

The Custom Reports subsystem treats report configuration as trusted SQL, allowing users with configuration privileges to influence the query text rather than restricting them to structured filters and parameterized clauses.

As a result, the query builder constructs dynamic SQL that is executed by the database driver, turning configuration fields into a vehicle for executing attacker-controlled queries.

Potential impact

  • Attackers may exfiltrate sensitive data from application tables, including user records, configuration values, and business data.
  • They could perform UNION-based queries to blend attacker-controlled result sets with legitimate report output.
  • They can call dangerous database functions that may reveal schema details, system information, or assist in further exploitation.
  • They may modify or delete database records if the connected database account has write privileges.
  • They could pivot to other parts of the data layer, using error-based injection to enumerate tables, columns, and indexes.

General mitigation guidance

Effective mitigation focuses on reducing SQL construction flexibility and enforcing strong separation between configuration data and query logic.

Recommended patterns include:

  • Designing the reporting system around parameterized queries, where users choose from predefined filters and fields rather than author raw SQL fragments.
  • Validating and constraining configuration inputs using whitelists of allowed columns, operations, and functions instead of passing arbitrary SQL.
  • Applying least-privilege to the database account used by Pimcore, ensuring it cannot perform dangerous operations outside the application's expected scope.
  • Centralizing query generation in a well-reviewed data access layer that consistently uses prepared statements and avoids dynamic concatenation of user input.
  • Treating any configuration that influences query text as untrusted and subject to the same sanitization and validation standards as user-submitted form data.

How teams detect issues like this

Organizations can identify and monitor this type of issue through several complementary strategies:

  • Static analysis rules that flag dynamic SQL construction where variables originating from HTTP requests, configuration objects, or user-editable fields are concatenated into query strings.
  • Secure code review practices that focus on report building, query generation utilities, and data access helpers, looking for patterns like string-based WHERE clauses or inline UNION segments.
  • Application-level logging of report definitions and executed queries, coupled with anomaly detection to highlight suspicious patterns such as unexpected UNIONs, subqueries, or calls to sensitive database functions.
  • Security policies requiring that all reporting and analytics features use parameterized queries and schema-based query builders, with automated checks in CI to enforce these conventions.
  • Use of database activity monitoring tools to detect abnormal query behavior originating from application accounts, such as large-scale data reads or schema enumeration.

Sources

SourceLink
github.comgithub.com/pimcore/pimcore/commit/3fd7733464f464e58ffa49ed91550c1a3f9535f2
github.comgithub.com/pimcore/pimcore/pull/19098
github.comgithub.com/pimcore/pimcore/releases/tag/v12.3.6
github.comgithub.com/pimcore/pimcore/security/advisories/GHSA-3234-gxc3-pq6f

Frequently asked

questions

Yes. It is reachable via HTTP requests to the Pimcore application where the Custom Reports feature is enabled, provided the attacker has an account with sufficient permissions.

The attacker needs a Pimcore user account with the reports_config permission or equivalent rights that allow creation or modification of custom report configurations. They do not necessarily need direct database access.

The safest fix is to eliminate direct use of user-specified SQL in report definitions, replacing it with parameterized queries built from constrained configuration options. All user-controlled values should be bound as parameters, and the set of selectable tables, columns, and operations must be strictly whitelisted.

Future features should adopt a secure-by-design query builder that separates user choices (filters, sort keys, fields) from query syntax, enforce strong input validation on configuration, and mandate code review for any functionality that builds SQL dynamically. Additionally, keeping database accounts restricted and using automated checks for dynamic SQL patterns helps catch issues before deployment.

Find out what's already
exploitable in your codebase.