Skip to content

Pimcore has Unsafe PHP Deserialization in Multiple Locations Without allowed_classes Restriction

High severity GitHub Reviewed Published May 26, 2026 in pimcore/pimcore • Updated Jul 10, 2026

Package

composer pimcore/pimcore (Composer)

Affected versions

>= 12.0.0-RC1, <= 12.3.6
<= 11.5.16
>= 2026.1.0, < 2026.1.3

Patched versions

12.3.7
11.5.17
2026.1.3

Description

GitHub Security Advisory Draft — GM-374

Summary

Multiple locations in Pimcore v11 call PHP's unserialize() on data from database columns and filesystem files without the allowed_classes restriction, enabling object injection if an attacker can control the serialized data source.

Severity

CVSS 3.1: 8.0 (High) — AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

Affected Component

  • Package: pimcore/pimcore and pimcore/admin-ui-classic-bundle
  • Files:
    • lib/Tool/Authentication.php (line 82) — session token deserialization
    • models/Site/Dao.php (line 68) — site domains from database
    • models/DataObject/ClassDefinition/CustomLayout/Dao.php (line 69) — layout definitions from database
    • models/Tool/TmpStore/Dao.php (line 64) — temporary store data from database
    • models/Asset/WebDAV/Service.php (line 36) — delete log from filesystem
    • admin-ui-classic-bundle/src/Helper/Dashboard.php (line 64) — dashboard config from filesystem

Description

Six locations in Pimcore core call unserialize() directly (bypassing Tool\Serialize) on data sourced from database columns or filesystem files without passing the allowed_classes parameter. This means any class available in the autoloader will be instantiated during deserialization.

If an attacker can write to the data source (e.g., via SQL injection targeting the tmp_store, sites, or custom_layouts tables, or via a file write vulnerability targeting the WebDAV delete log), they can inject serialized PHP gadget chains that execute arbitrary code when the data is deserialized.

This is related to but distinct from the Tool\Serialize::unserialize() issue — these calls bypass the wrapper entirely.

Impact

PHP object injection leading to Remote Code Execution when chained with a data source write vulnerability. Pimcore's dependency tree (Guzzle, Symfony, Monolog, Doctrine) provides numerous known gadget chains.

Proof of Concept

  1. Identify a writable data source (e.g., tmp_store table via SQL injection, or webdav-delete.dat via file write)
  2. Write a serialized PHP gadget chain (e.g., Monolog BufferHandler chain from phpggc)
  3. Trigger the deserialization (e.g., access a page that reads TmpStore, or trigger a WebDAV operation)
  4. The gadget chain executes with web server privileges

Suggested Fix

Add allowed_classes parameter to all unserialize() calls. Where no objects are needed, use ['allowed_classes' => false]. Consider migrating to JSON serialization for data that doesn't require object preservation.

// Example fix for Site/Dao.php:
$siteDomains = unserialize($site['domains'], ['allowed_classes' => false]);

// Example fix for TmpStore/Dao.php:
$item['data'] = unserialize($item['data'], ['allowed_classes' => false]);

References

  • CWE-502: Deserialization of Untrusted Data
  • OWASP Deserialization Cheat Sheet
  • phpggc: PHP Generic Gadget Chains

References

@kingjia90 kingjia90 published to pimcore/pimcore May 26, 2026
Published to the GitHub Advisory Database May 27, 2026
Reviewed May 27, 2026
Last updated Jul 10, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(42nd percentile)

Weaknesses

Deserialization of Untrusted Data

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. Learn more on MITRE.

CVE ID

CVE-2026-45162

GHSA ID

GHSA-36fc-7wjg-mfvj

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.