Summary
A high-severity SQL injection vulnerability in Pimcore's admin-ui-classic-bundle allows authenticated backend users to influence database queries through the DataObject grid ID column filter. When the filter value is incorporated into the SQL WHERE clause without parameterization, an attacker with suitable backend access may read, modify, or otherwise manipulate database contents.
Affected context
The issue may occur in Pimcore deployments using the classic administration interface and its DataObject grid. It becomes risky when authenticated backend users can access the affected ID column filter and the application constructs SQL statements by concatenating filter input rather than binding it as a parameter.
Exploit preconditions
- Attack surface: Pimcore classic administration DataObject grid
- Required access: An authenticated backend account with access to the relevant grid and filter
- Trigger point: Processing the ID column filter in a grid query
- Why exploitation is possible: User-controlled filter data is concatenated into the SQL WHERE clause without parameterized query handling
Why this happens
The underlying bug is a failure to separate SQL code from user-controlled data. The DataObject grid query incorporates the ID filter value directly into a SQL WHERE clause, allowing input to alter query semantics instead of being treated solely as a value. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Potential impact
- An attacker may retrieve sensitive database records
- An attacker could modify or delete database contents
- The vulnerability may enable unauthorized access to application data
- Database integrity and business workflows could be disrupted
- Exposed credentials or secrets could support further compromise
General mitigation guidance
Mitigation typically focuses on ensuring that all database queries treat filter values as data rather than executable SQL.
Common defensive patterns include:
- Use parameterized queries or prepared statements for every dynamic filter
- Apply strict server-side type validation to identifier fields
- Prefer query-builder or ORM APIs that separate expressions from bound values
- Avoid relying on escaping alone as the primary SQL injection defense
- Restrict backend privileges according to job responsibilities
- Ensure database accounts used by the application have only required permissions
- Reduce exposure of administrative interfaces through network and access controls
How teams detect issues like this
Organizations commonly detect SQL injection risks through:
- Static analysis rules for string concatenation or interpolation in SQL construction
- Code review checks for unbound request or filter values in database queries
- Dynamic application testing of grid filters and other structured search inputs
- Database monitoring for anomalous queries issued by administrative sessions
- Policy enforcement requiring prepared statements or approved query-builder interfaces
- Automated code review tools that flag unsafe data-to-query flows

