/

CVE-2026-55634

Severity:

CRITICAL RISK

(9.9)

Code Injection (CWE-94) in Pimcore Class Import APIs

CVE-2026-55634

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-89, CWE-94

Impact:

Remote Code Execution and SQL Injection

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical input-validation vulnerability in Pimcore class-definition imports allows an authenticated user with object permissions to place non-identifier content into generated PHP properties and SQL identifiers. Depending on the affected path, this may enable attacker-controlled code execution when a generated DataObject class is instantiated and could also alter schema-changing database statements.

Affected context

The vulnerability occurs in Pimcore deployments that expose the class-definition import endpoint and allow an authenticated user with the objects permission to submit or influence DataObject field names. Risk arises when those names are incorporated into generated PHP classes or database schema statements without a strict identifier allowlist. The issue is relevant where generated classes are subsequently loaded or where imported definitions trigger schema changes.

Exploit preconditions

  • Attack surface: Authenticated Pimcore class-definition import functionality
  • Required access: An authenticated account with the objects permission and the ability to influence an imported field name
  • Trigger point: Class-definition processing, generated DataObject class loading, or schema-changing database operations
  • Why exploitation is possible: Field names are used as PHP property and SQL identifier content without sufficiently restrictive validation

Why this happens

The underlying flaw is inadequate validation of user-controlled names before they are emitted into executable PHP source and SQL statements. The central name validation allowed characters and syntax that are not valid for a constrained identifier, enabling input to cross multiple interpreter boundaries as code or SQL structure.

This maps primarily to CWE-94: Improper Control of Generation of Code, because attacker-influenced data can become part of generated PHP code. It also maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, because the same class of input can affect SQL identifier content in schema-changing statements.

Potential impact

  • An attacker may execute code in the Pimcore application process
  • Application data and credentials could be exposed or modified
  • Generated DataObject classes could be persistently tampered with
  • Database schema-changing operations could be altered
  • The application or connected systems could experience service disruption
  • Attackers could gain a platform for further internal compromise

General mitigation guidance

Mitigation generally focuses on treating field names as constrained identifiers rather than free-form text.

Common defensive patterns include:

  • Enforce a strict allowlist for identifiers before generation or database use
  • Generate PHP properties and SQL identifiers only from validated, canonical names
  • Keep data values separate from code and SQL structure
  • Apply context-specific escaping where dynamic identifiers are unavoidable
  • Validate inputs before code generation, persistence, or schema modification
  • Restrict class-definition import permissions according to least privilege
  • Protect generated class files and schema-management workflows from unauthorized modification
  • Add review and approval controls for configuration that can generate executable application code

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying user-controlled strings used in PHP source generation
  • Rules that detect dynamic SQL identifiers assembled without allowlist validation
  • Code review checks for field-name validation and identifier canonicalization
  • Tests using invalid identifier characters to verify rejection before generation
  • Monitoring of class-definition imports, generated DataObject file changes, and unexpected schema alterations
  • Policy enforcement requiring separate validation boundaries for PHP generation and database operations

Automated security review tools may help identify data flows from import endpoints into code-generation or SQL-building routines, but findings should be confirmed against the application's permission and execution model.

Sources

SourceLink
github.comgithub.com/advisories/GHSA-r2f4-ff2p-xc64
github.comgithub.com/pimcore/pimcore/commit/a4f8c3cfee58b7d5fe4873d67782eff58dae9b9d
github.comgithub.com/pimcore/pimcore/pull/19183
github.comgithub.com/pimcore/pimcore/releases/tag/v2026.1.6
github.comgithub.com/pimcore/pimcore/security/advisories/GHSA-9x44-4gxf-8c25

Frequently asked

questions

Exploitation generally requires authentication and the objects permission, along with the ability to influence a field name through the class-definition import workflow.

It may. If attacker-controlled content is written into a generated DataObject class and that class is later instantiated, the resulting PHP code may execute within the application's process.

Yes. Because field names can also reach schema-changing SQL identifiers, malformed or hostile input could affect database operations where those identifiers are not strictly constrained.

Validate names against a strict identifier allowlist before they reach code generation or SQL construction, keep permissions least-privileged, and prevent unreviewed users from controlling generated application artifacts.

Find out what's already
exploitable in your codebase.