SQL Injection in Pimcore via ClassDefinition UID
An improper input validation in Pimcore's ClassDefinition UID and unsanitized SQL query construction allow authenticated users to perform UNION-based SQL injection and exfiltrate database contents.
Pimcore versions 2026.1.0 through 2026.1.4 and versions prior to 12.3.9 are vulnerable to SQL injection (CVE-2026-55072). The vulnerability stems from an incomplete fix regarding input validation of ClassDefinition UIDs. The regex used to validate the UID lacks an end anchor ($), allowing a user with 'objects' permissions to supply a string that starts with a valid character but contains additional malicious SQL.
When this class is subsequently instantiated and accessed via a 'Block' field, the Block.php component concatenates the raw, unquoted classId directly into SQL queries. This allows an attacker to break out of the intended query context and execute arbitrary SQL commands. An attacker can leverage this to exfiltrate sensitive data, including password hashes from the users table, by performing a UNION-based SQL injection attack.
Attack Chain
- Attacker authenticates to the Pimcore Studio API with valid 'objects' level credentials.
- Attacker invokes the
createaction on theClassDefinitionconfiguration endpoint. - Attacker submits a specially crafted
uidparameter containing a SQL payload (e.g.,1 UNION SELECT...). - The application processes the
uidusing an insufficiently anchored regex, which passes validation. - The attacker creates a new data object associated with this malicious class definition.
- Attacker requests the data object via the API, triggering
Block.phpto load field data. Block.phpperforms an unquoted string concatenation of the classId into a database query.- The underlying database executes the injected payload, returning sensitive table contents in the API response.
Impact
Successful exploitation allows an authenticated editor-level user to perform arbitrary SQL queries against the application database. This enables unauthorized exfiltration of sensitive information, including user credentials and configuration data. The impact is significant as it requires only standard editor permissions, facilitating privilege escalation via credential access.
Recommendation
- Upgrade to a patched version of Pimcore that addresses CVE-2026-55072 immediately.
- Audit existing
ClassDefinitionentries for UIDs containing non-alphanumeric characters or suspicious SQL keywords. - Deploy the Sigma rules below to monitor for suspicious POST requests to the
ClassDefinitioncreation and data object retrieval endpoints. - Ensure database users operate with the principle of least privilege, specifically restricting access to sensitive tables like
usersfrom the web application user.
Immediate actions
Patch Pimcore to version 12.3.9 or higher.
Threat Hunt
Search logs for POST requests to /api/class/definition/ containing SQL keywords.
Data: webserver_logs
Mitigations
Review all ClassDefinitions for anomalous UIDs.
CVE-2026-55072
Detection coverage 1
Detects CVE-2026-55072 Exploitation - SQL Injection via ClassDefinition UID
highDetects attempts to create a ClassDefinition with a UID containing SQL injection syntax, identifying potential exploitation of the missing regex anchor vulnerability.
Detection queries are available on the platform. Get full rules →