/

CVE-2026-55416

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in Pimcore Custom Reports Adapter

CVE-2026-55416

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Disclosure, Modification, or Deletion

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

Pimcore contains a SQL injection vulnerability in Custom Reports configuration handling. An authenticated user with the reports_config permission may be able to insert SQL fragments into report fields, potentially exposing, modifying, or deleting database data when the report is executed.

Affected context

The issue occurs in Pimcore deployments where authenticated users with reports_config permission can create or modify Custom Reports configurations. Report fields such as sql, from, where, and groupby are incorporated into a database query, while pagination values were also previously interpolated without strict integer handling. The risk depends on the permissions granted to the reporting user and the database account used by Pimcore.

Exploit preconditions

  • Attack surface: Custom Reports configuration and report execution functionality
  • Required access: An authenticated Pimcore account with reports_config permission
  • Trigger point: Execution of a Custom Report that processes the configured query
  • Why exploitation is possible: Attacker-controlled query components are concatenated into SQL before execution, and blacklist-based filtering may not reliably enforce a safe query structure

Why this happens

The underlying flaw is the construction of SQL statements by concatenating configuration values that can be influenced by an authorized user. This insecure pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection. Filtering selected keywords or query constructs with a blacklist does not provide the same security guarantees as parameterized queries, structured query builders, and strict validation of permitted report expressions.

Potential impact

  • An attacker may disclose data from database tables accessible to the application
  • An attacker could alter records or stored application data
  • An attacker may delete database data if the database account permits those operations
  • Sensitive report results could be exposed to an otherwise authorized but untrusted user
  • Application integrity and downstream business workflows could be affected

General mitigation guidance

Mitigation generally focuses on eliminating dynamic SQL concatenation and reducing trust in report configuration values.

Common defensive patterns include:

  • Use parameterized queries or a constrained query builder for all variable values
  • Represent report fields, filters, sorting, and grouping as validated structured data rather than raw SQL fragments
  • Apply strict allowlists for selectable columns, tables, operators, and expressions
  • Validate pagination values as bounded integers before query construction
  • Avoid relying on keyword blacklists as the primary SQL injection control
  • Restrict report-configuration permissions according to least privilege
  • Use database accounts with only the read and schema permissions required by reporting
  • Separate reporting data access from write-capable application credentials where practical

How teams detect issues like this

Detection can combine source review, automated analysis, and runtime monitoring:

  • Search for string concatenation or interpolation of report configuration values into SQL statements
  • Flag database execution calls that receive dynamically assembled query text
  • Review blacklist-based SQL filtering for bypass-prone logic
  • Check that pagination, sorting, filtering, and grouping inputs are type-validated and allowlisted
  • Use code-review policies requiring parameterized queries or approved query-builder APIs
  • Monitor database activity for unexpected statements issued by reporting components
  • Use automated static analysis or software composition review tools to identify SQL construction patterns

Sources

SourceLink
github.comgithub.com/pimcore/pimcore/commit/1999fee27ed0d027ad5b8195ecf6e27243729530
github.comgithub.com/pimcore/pimcore/pull/19175
github.comgithub.com/pimcore/pimcore/releases/tag/v12.3.10
github.comgithub.com/pimcore/pimcore/releases/tag/v2026.1.6
github.comgithub.com/pimcore/pimcore/security/advisories/GHSA-23rh-xw42-fq82

Frequently asked

questions

Exploitation generally requires an authenticated Pimcore user with permission to configure Custom Reports. The practical impact also depends on the database privileges available to the application.

No. A qualifying user may be able to trigger the vulnerable behavior through the Custom Reports functionality, although the report execution path must reach the database query operation.

Replace raw SQL concatenation with parameterized queries or a constrained query builder, and model report options as validated structured values rather than arbitrary SQL fragments.

Enforce least-privilege report permissions and database accounts, use strict allowlists for query components, validate numeric inputs by type and range, and require automated and manual review of dynamic SQL construction.

Find out what's already
exploitable in your codebase.