Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-priv 'objects' user
-
DeliveryPOST crafted class definition to Studio import API
-
ExploitMalicious field name emitted into generated PHP class
-
ExecutionLoad/instantiate an object of the class
-
PersistInjected __construct() executes PHP as web-server user
-
ImpactFull server and database compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated Pimcore account holding the ordinary 'objects' (DataObjects) permission - the standard content-editor permission, not admin or a dedicated 'classes' permission - and network access to the Studio backend import endpoint POST /pimcore-studio/api/class/definition/configuration-view/detail/{id}/import (gated only by #[IsGranted('objects')], with no element/workspace secondary authorization because class definitions are global schema). The attacker must supply the malicious field name through the API/console rather than the Studio UI, because the UI enforces an identifier pattern client-side while the API does not. To reach the RCE sink the payload should use a non-persistent field type or a field name of ≤64 bytes so the ALTER TABLE DDL step does not abort before PHP class generation. Execution of the RCE further requires that an object of the affected class be instantiated (opened in Studio or loaded via DataObject::getById()) so the injected __construct() runs - autoloading alone runs only top-level class-body code, not the constructor. Limiting factors: valid authentication and the 'objects' permission are prerequisites, and the constructor must be triggered; the SQL-injection primitive fires on save without needing object load. |
| Impact | This is a genuine high-priority issue rather than a paper-high CVSS. The vendor vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H = 9.9 reflects network reach, low complexity, and only a low-privilege content-editor permission ('objects') as the barrier - no administrator role is needed, which is the key aggravating factor. The advisory itself publishes exploit code (a lab harness that runtime-confirms the RCE sink, plus an end-to-end browser-console PoC), so publicly available exploit code exists; however there is no CISA KEV listing and no EPSS probability in the supplied intelligence, so there is no evidence of active exploitation and widespread automated exploitation cannot be quantified from the data. The vendor is candid that the RCE is 'sink-confirmed + chain-reasoned', not fully executed on a live instance, which slightly tempers exploitation confidence but does not lower the ceiling. The S:C scope metric is the one debatable choice: scoring the impact within a single PHP/OS authority (S:U) yields 8.8 High, so the severity floor is High regardless. Given a patch is already available and the required privilege is one commonly granted to ordinary editors, defenders should treat this as urgent and patch on their next accelerated cycle rather than waiting for KEV confirmation. |
| Exploit ScenarioDerived | A content editor (or an attacker who has phished/compromised such an account) with only the 'objects' permission creates a throwaway DataObject class, then uses the Studio import API - bypassing the client-side-only UI validation, e.g. via the browser DevTools console PoC in the advisory - to import a class definition whose field name closes the generated property and injects a PHP __construct() that runs a shell command. When any object of that class is loaded (opened in Studio or fetched via DataObject::getById()), the constructor fires and the attacker's code executes as the web-server user, yielding full server compromise; the advisory demonstrates the sink executing 'id' as root in a lab harness. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 28, 2026
Remote code execution in Pimcore (all releases up to 12.3.9, plus 2026.1.0 through 2026.1.5) lets any authenticated user holding only the ordinary low-privilege 'objects' DataObjects permission import a DataObject class definition whose field name breaks out of the generated 'protected $<name>;' property and injects attacker-controlled PHP into the class file Pimcore emits, executing arbitrary code as the web-server user when an object of that class is instantiated. The same unvalidated field name is concatenated into ALTER TABLE DDL, giving a parallel SQL-injection primitive. It is an incomplete-fix sibling of CVE-2026-5394, which hardened only the composite-index sink; the advisory (GHSA-9x44-4gxf-8c25) ships a working browser-console PoC, but there is no CISA KEV entry and no EPSS score in the provided data.
RemediationAI
Vendor-released patch: upgrade to Pimcore 12.3.10 (for the 12.x line) or 2026.1.6 (for the 2026.x line); the fix adds an identifier allowlist in models/DataObject/ClassDefinition/Data.php (setName rejects names not matching /^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/) and switches the DDL helper to quoteIdentifier, per PR https://github.com/pimcore/pimcore/pull/19183 and commit a4f8c3cfee58b7d5fe4873d67782eff58dae9b9d (advisory GHSA-9x44-4gxf-8c25). If you cannot patch immediately, restrict the import route to administrators with a custom Symfony security voter, or disable class-definition import in production entirely (trade-off: blocks legitimate schema import/migration workflows), or add a WAF rule limiting POST to .../class/definition/configuration-view/detail/*/import to trusted operator source addresses (trade-off: does not stop an authorized-but-malicious editor). For detection, enable File Integrity Monitoring on var/classes/DataObject/*.php and alert on the appearance of 'function' or '__construct(' tokens in generated class bodies, and raise any non-admin import POST to a high-priority audit alert. As a longer-term hardening step, gate class-definition import/save behind a dedicated administrative permission distinct from the content-editor 'objects' permission.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Pimcore generates a concrete PHP class file (var/classes/DataObject/<Class>.php) for every DataObject class. In lib/DataObject/ClassBuilder/FieldDefinitionPropertiesBuilder.php the raw field name ($key) is concatenated directly into PHP source as 'protected $'.$key.";\n", so a name like 'poc; public function __construct(){ /* PHP */ } private $z' produces a valid class body with an attacker-defined constructor. The same identifier is also interpolated with backtick string-quoting (not quoteIdentifier) into ALTER TABLE ... ADD COLUMN/ADD INDEX statements in models/DataObject/ClassDefinition/Helper/Dao.php, so a backtick escapes the quoted identifier. The affected package is pkg:composer/pimcore_pimcore. The assigned CWE-89 (SQL Injection) captures only the DDL sink; the primary and more severe defect is unvalidated-identifier-into-generated-code (a code-injection/CWE-94 class of flaw). The root cause is a missing identifier allowlist on field names: the codebase already enforces one for enum options (SelectOptionsEnumBuilder.php:188, /^[A-Z-a-z_][A-Za-z0-9_]*$/) and for composite indices, but the field-name path relied only on an angle-bracket check and a reserved-word denylist.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Network import endpoint, low complexity, only the low-priv 'objects' permission (PR:L); attacker can trigger object load themselves (UI:N); injected code escapes the app into the OS (S:C) with full CIA impact.
Primary rating from Vendor (https://github.com/pimcore/pimcore).
CVSS VectorVendor: https://github.com/pimcore/pimcore
DescriptionCVE.org
Overview
A DataObject class-definition field name is concatenated, without an identifier allowlist, into the PHP class source that Pimcore generates for every DataObject class (protected $<fieldName>;). A user holding only the ordinary objects (DataObjects) permission can import a class definition whose field name closes the property and injects arbitrary PHP into the generated class file, achieving remote code execution on the server. The same unvalidated field name is also concatenated into ALTER TABLE DDL (ADD COLUMN/ADD INDEX), giving a parallel SQL-injection primitive. This is a sibling of CVE-2026-5394 (composite-index column SQL injection); that fix hardened only the compositeIndices sink and left the field-name path untouched.
Impact
Any authenticated user with the objects permission - the standard permission for content editors who work with DataObjects, not an administrator or a dedicated "classes" permission - can:
- Execute arbitrary PHP on the server (RCE). The injected code runs in the web application's PHP process when an object of the affected class is loaded (and is re-executed on every load), with full access to the application, its database credentials, secrets, and the host filesystem/OS - i.e. full server compromise.
- Execute arbitrary ALTER TABLE DDL (SQL injection) against the DataObject store/query tables (drop columns, add indexes, corrupt schema).
Confidence (read with the Reproduction section). The RCE sink - the real builder emitting attacker PHP into the generated class body, that class loading, and its __construct() executing a shell command - is runtime-confirmed in an isolated harness (see Reproduction → "Lab confirmation"). The remaining links of the end-to-end chain are reasoned from source but not yet run end-to-end on a live Pimcore: (a) the Studio import path (generateLayoutTreeFromArray → save) preserving the field name without transform/reject; (b) the persistent-field DDL step not aborting the save (addressed by the ≤64-byte gadget); and (c) Pimcore instantiating the object (new, e.g. via DataObject::getById()) so __construct() fires - autoloading alone executes only top-level class-body code, not the constructor. Treat the RCE as sink-confirmed + chain-reasoned, not as a fully-executed live exploit.
Because the injected PHP executes with the privileges of the PHP runtime (typically the web-server user) and reaches the operating system - beyond the authority of the Pimcore application account the attacker started from - the scope is assessed Changed (S:C), consistent with Pimcore's own scoring of the analogous Custom-Reports SQL injection (GHSA-3234-gxc3-pq6f, AV:N/AC:L/PR:L/UI:R/S:C, 8.7); the result here is RCE rather than read-only SQLi, yielding 9.9 Critical. S:C is the one debatable metric: a reviewer who scores the impact within the single PHP/OS authority as S:U lands at AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H = 8.8 High. The severity floor is therefore High regardless of the scope interpretation.
Technical Details
Source → sink (RCE)
Pimcore generates a PHP class file for every DataObject class. The property block is built in lib/DataObject/ClassBuilder/FieldDefinitionPropertiesBuilder.php:
`$key` is the field name. The string is assembled into a class body in `lib/DataObject/ClassBuilder/ClassBuilder.php:104-112` (`class <Name> extends <...> {\n` + properties), written to `var/classes/DataObject/<Class>.php`, and autoloaded/included. A field name such as:
produces a valid class body containing an attacker-defined __construct() that executes when an object of the class is loaded.
That the maintainers know name→PHP-generation requires an identifier allowlist is shown by the sibling enum-option generator, which does enforce one:
The field-name path has no equivalent.
### Parallel SQL-injection sink
The same field name is concatenated, with backtick **string** quoting (not `quoteIdentifier`), into DDL:
Source: models/DataObject/ClassDefinition/Dao.php:228 → $this->addModifyColumn($objectDatastoreTable, $key, $value->getColumnType(), '', 'NULL'), $key = field name. A backtick in the field name breaks out of the quoted identifier.
Contrast the patched composite-index sink, now guarded by an allowlist and quoteIdentifier (models/DataObject/Traits/CompositeIndexTrait.php).
Why validation does not stop it
The complete field-name validation across the import → save path:
models/DataObject/ClassDefinition/Service.php:296(generateLayoutTreeFromArray):preg_match('/<.+?>/', $name)- rejects only angle-bracket names. Backtick,;,{},(), quotes, spaces all pass.- 2.
models/DataObject/ClassDefinition/Data.php:1292(isForbiddenName()) - a reserved-word denylist (in_array(strtolower($name), FORBIDDEN_NAMES)), no character filtering. - 3.
models/DataObject/ClassDefinition.php:1149- validates the class name/id only.
No allowlist is applied to field names. The Studio UI enforces an identifier pattern client-side; the API does not.
Reachability / privilege
The HTTP entry point (pimcore/studio-backend-bundle):
#[Route(self::ROUTE, name: 'pimcore_studio_api_class_definition_import', methods: ['POST'])] #[IsGranted(UserPermissions::DATA_OBJECTS->value)] // UserPermissions::DATA_OBJECTS = 'objects' public function importClassDefinition(string $id, #[MapUploadedFile] UploadedFile $file): JsonResponse { return $this->jsonResponse( $this->classDefinitionService->importClassDefinitionFromJson($id, $file->getContent()) ); } ```
`importClassDefinitionFromJson` → `ClassDefinitionRepository::importFromJson` → model `save()` → `saveClassInternal()`, which runs the DDL (`getDao()->save()`) and then the PHP class generation (`generateClassFilesInternal()`). The endpoint requires only the `objects` permission (`PR:L`) and performs no field-name validation of its own. The single authorization gate is the route-level `#[IsGranted('objects')]`; a DataObject **class definition** is global schema (not a workspace-scoped element), so no element-/workspace-level secondary authorization applies to the import - `objects` alone reaches the sink, which is what anchors `PR:L`. This is the same import endpoint used in the CVE-2026-5394 PoC.
### Execution order
In `saveClassInternal()`: field denylist check → class-name regex → `getDao()->save()` (DDL sink fires) → `generateClassFilesInternal()` (PHP-gen sink fires). The SQLi triggers first; the RCE payload either uses a non-persistent field type (no `ADD COLUMN`) or a ≤64-byte DDL-valid name so the DDL step does not abort before PHP generation.
## Reproduction
### Lab confirmation of the RCE sink (runtime, verified)
Using the **unmodified** `FieldDefinitionPropertiesBuilder` source driven by a minimal `ClassDefinition` whose single field name is a PHP payload (full harness in the attached `rce_harness.php`):
Observed (php:8.3-cli):
The real builder emitted a class body containing the attacker's `__construct()`, and loading the class executed the injected command.
### End-to-end PoC (browser console, against the Studio API)
const CLASS_ID = "REPLACE_WITH_A_THROWAWAY_TEST_CLASS_ID";
const fieldName = 'x;function __construct(){touch("/tmp/pimcore_rce_poc");}//';
const def = { layoutDefinitions: { name: "pimcore_root", fieldtype: "panel", datatype: "layout", children: [ { name: fieldName, fieldtype: "input", datatype: "data", title: "poc" } ] } };
const fd = new FormData(); fd.append("file", new Blob([JSON.stringify(def)], { type: "application/json" }), "import.json");
fetch(/pimcore-studio/api/class/definition/configuration-view/detail/${CLASS_ID}/import, { method: "POST", credentials: "include", body: fd, }).then(r => r.json()).then(console.log); `
Steps:
- As a user with only the
objectspermission, create/own a throwaway DataObject class and note its id (CLASS_ID). - 2. Open DevTools → Console and run the snippet above. Expected: a success JSON for the import (the class is regenerated).
- 3. Load any object of that class (open it in Studio, or request it) to autoload the regenerated
var/classes/DataObject/<Class>.php. - 4. Confirm
/tmp/pimcore_rce_pocwas created on the server - proving the field name executed as PHP.
Q0a / Q0b
- Q0a (vendor accepted-risk): not by-design. The sibling enum-option generator enforces an identifier allowlist (
SelectOptionsEnumBuilder.php:188/^[A-Z-a-z_][A-Za-z0-9_]*$/) and the composite-index fix added one - the field-name path simply lacks the equivalent. Source-verified: the only import-path field-name check isService.php:297preg_match('/<.+?>/', $name)(angle-brackets only;;{}(), spaces, backtick all pass), andFieldDefinitionPropertiesBuilder.php:30concatenates the raw$keyintoprotected $<name>;. No upstream allowlist gate exists. PASS. - Q0b (venue-routed dedup; venue = github-security-advisory): sibling/incomplete-coverage of CVE-2026-5394 / GHSA-r2f4-ff2p-xc64 (DataObject composite-index SQL injection), whose fix hardened only
CompositeIndexTrait. The field-name → PHP-codegen RCE (FieldDefinitionPropertiesBuilder) and the field-name → ALTER TABLE DDL (Helper/Dao.php) are distinct, unfixed sinks. Not covered by GHSA-3234 (Custom Reports SQLi, different feature). Not a duplicate. CLEAR. - Secondary sink noted:
Service.php:517also concatenates the raw field name into a generated PHP string literal (public const FIELD_... = '<name>';) - a second codegen-injection point (string-literal breakout via'), same root cause; the allowlist fix closes both.
Suggested Fix
Apply an identifier allowlist to field names at the model boundary, identical in spirit to the enum-option guard and the composite-index fix. In models/DataObject/ClassDefinition/Data.php (e.g. in setName() or a central validity check invoked from saveClassInternal()), reject any name not matching /^[a-zA-Z][a-zA-Z0-9_]{0,62}$/:
Additionally, defense-in-depth: use `quoteIdentifier()` for `$colName`/`$indexName` in `models/DataObject/ClassDefinition/Helper/Dao.php`, and never interpolate identifiers into generated PHP without allowlisting. Enforce the same check in the Studio import controller/service so client-side-only validation cannot be bypassed via the API.
**Privilege-model fix (root cause, separate from the input filter).** A class-definition import changes the database schema and generates server-side PHP, yet it is gated only by the content-editor `objects` permission. Gate class-definition import/save behind a dedicated administrative permission (or `admin`), distinct from `objects`.
**Operator-side detection / mitigation (deployable today, before a patch):**
- **Detection:** File Integrity Monitoring on `var/classes/DataObject/*.php` - alert on unexpected changes, and specifically on the appearance of `function`/`__construct(` tokens in a generated class body. Raise the class-definition-import audit event to a high-priority alert. Flag any non-admin POST to `.../class/definition/configuration-view/detail/*/import`.
- - **Interim mitigation:** restrict the import endpoint to administrators via a custom security voter; or disable class-definition import in production; or add a WAF rule limiting POST `.../class/definition/configuration-view/detail/*/import` to trusted operators.
### Additional codegen-injection sinks sharing this root cause
The same "unvalidated identifier → generated PHP" pattern exists at **other identifier boundaries**:
- **Class NAME → `ClassBuilder.php:104`**: `'class '.ucfirst($classDefinition->getName()).' extends '...`. The only gate is `ClassDefinition.php:1149` `preg_match('/^[a-zA-Z]\w+/', getName())` - **missing the `$` end-anchor**, so `Foo){};<php>` passes the prefix match.
- - **FieldCollection / ObjectBrick KEY → `FieldCollectionClassBuilder.php:58`** (`'class '.ucfirst($definition->getKey()).' extends '`) and the objectbrick equivalent - reached via their own import endpoints.
**Exploitability caveat:** unlike the runtime-confirmed field-name vector, the class-name vector is **NOT independently confirmed as RCE** and has a structural blocker. The class name determines the generated file's path, and PHPClassDumper writes the file but does not include it - the generated class is executed only when the autoloader maps a clean class reference. The field-name vector is reliable precisely because it keeps the filename clean. The class-name/key sinks are therefore reported here as **fix-completeness / defense-in-depth** (anchor the regex), not as a second confirmed RCE.
## Disclosure Timeline
- 2026-05-29: Discovered (sibling sweep of CVE-2026-5394); RCE sink runtime-confirmed in a lab harness using the unmodified builder source.
- - (Reported to vendor: to be filled on submission via GitHub Security Advisory.)Articles & Coverage 1
Technical POC Analysis
The flaw is unvalidated identifiers reaching two sinks: generated PHP source (CWE-94) and ALTER TABLE DDL (CWE-89).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Pimcore versions up to 12.3.9 and 2026.1.0-2026.1.5 contain a critical remote code execution vulnerability allowing authenticated users with low-privilege 'objects' DataObjects permission to inject arbitrary PHP code via malformed field names in DataObject class imports. Successful exploitation executes code as the web-server process, exposing organizations to complete infrastructure compromise through a readily exploitable vulnerability.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
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
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
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
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
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
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-67871
GHSA-9x44-4gxf-8c25
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB