Summary
A broken authorization check in Pimcore's Studio API lets users with only object-level permissions create new class definitions, a capability intended for administrators.
Because class creation generates database tables and PHP class files and passes malformed identifiers deeper into the stack, this becomes risky whenever editor-level accounts are broadly assigned or exposed.
Affected context
This vulnerability appears in Pimcore deployments where the Studio API endpoint:
POST /pimcore-studio/api/class/definition/configuration-view/detail/create
is exposed to authenticated users. The issue arises when the endpoint checks only "objects" permissions instead of stricter "classes" permissions, effectively granting class definition creation capabilities to editor-level roles. It is most relevant in environments where many non-admin users can access the Studio interface and where class definitions drive database structures and auto-generated PHP models.
Exploit preconditions
- Attack surface: Authenticated Pimcore Studio API over HTTP(S)
- Required access: Valid editor-level account with object permissions but without class administration rights
- Trigger point: Sending a POST request to the class definition configuration "create" endpoint with crafted parameters
- Why exploitation is possible: The endpoint enforces the wrong permission type (objects instead of classes), and API-layer UID format checks are missing, allowing malformed identifiers to propagate to the model layer and trigger internal exceptions
Why this happens
The core issue is an authorization control failure mapped to CWE-285: Improper Authorization.
The Studio API endpoint responsible for creating class definitions uses an inappropriate permission gate, treating it as an object-level operation rather than a higher-privilege class administration function. As a result, users with standard editor permissions can perform actions that should be restricted to administrators, such as defining new classes that generate database tables and PHP class files.
Additionally, the absence of strict UID format validation at the API boundary allows invalid identifiers to travel to deeper application layers, where they cause internal validation errors and exception leakage, exposing implementation details and weakening robustness.
Potential impact
- An editor-level user could create new class definitions without approval
- Creation of unintended database tables and PHP class files could alter system behavior
- Internal exceptions and error messages may reveal model-layer details and validation logic
- System integrity and data modeling conventions can be undermined by arbitrary or malformed class designs
General mitigation guidance
Addressing this pattern typically involves tightening authorization boundaries and layering input validation at the API edge.
Recommended defensive patterns include:
- Enforcing role-appropriate checks for administrative actions, ensuring class management endpoints require explicit "classes" or equivalent high-privilege permissions
- Standardizing permission mappings so that APIs, services, and UI layers all use consistent access control decisions for the same operation
- Applying strict UID and identifier format validation in the API layer, rejecting malformed input before it reaches deeper models or database logic
- Segregating duties by limiting the number of accounts with class-definition capabilities and ensuring those accounts follow least-privilege principles
- Introducing centralized authorization middleware or policies, reducing the chance that individual endpoints apply misaligned permission checks
How teams detect issues like this
Detection efforts can focus on both code-level and behavioral indicators:
- Static analysis and code review: Look for endpoints that perform high-impact operations (e.g., schema changes, code generation) while checking only generic or low-privilege permissions. Pay attention to mismatches between documented and implemented permissions.
- Authorization policy reviews: Compare route or controller permission requirements against a reference security policy to identify endpoints that rely on object-level rights for administrative tasks.
- Logging and monitoring: Track class definition creations, including which roles and accounts initiate them, and flag unexpected activity from non-admin users.
- Automated security testing: Use role-based integration tests that attempt privileged operations with lower-privilege accounts, catching authorization regressions early in CI.

