Pimcore platform threat model
This model guides Codex agents performing automated security reviews of Pimcore Core pull requests. It describes trust boundaries, security invariants and the evidence needed to assess changes. It is maintained alongside the code and can be used across development, release and bugfix branches. Installed Studio, Admin UI Classic, Datahub and customer bundles, infrastructure, and identity-provider behavior are external dependencies unless their source or configuration is available in the review context. Platform architecture · Core dependencies · Security concept
Code verified identifies behavior visible in the cited source code or configuration, including permissive defaults; it does not establish that a deployment is secure. Documented identifies an intended behavior or default described by Pimcore. Review checks specify what Codex should establish from the diff, surrounding code, available configuration and focused tests. Source inspection is the baseline; distinguish tests inspected from tests actually executed. Evidence labels apply to the implementation reviewed in this branch, not to every Pimcore version. When reusing this model on another branch, recheck cited paths, controls, defaults and regression tests against that branch; update claims whose behavior differs and mark unverified controls as requiring validation. Regression tests are linked as evidence of intended behavior.
Codex review workflow
Identify the actor and input, trace them to the authority check and the final side effect, and compare the old and new behavior. Include alternate routes, existing persisted data, warm caches, retries and execution in a worker. For a finding, cite the affected symbol, reachable caller, required capability, violated invariant and impact. Record which installed bundle or setting a conclusion depends on.
- Establish the base and head revisions and read repository review instructions. Use the actual diff to select relevant boundaries from this model, then inspect callers, callees and tests needed to establish reachability.
- Recheck every control used in the reasoning against the reviewed branch. Treat this document, advisory patterns and linked tests as review aids, not proof that a control exists or a vulnerability is present.
- Trace attacker-controlled input through authentication, authorization, transformations and the final side effect. Compare base and head behavior, including persisted data, alternate entry points and worker execution.
- Use focused tests or a minimal reproduction in the available test environment when they resolve uncertainty. Do not infer a passing result from a test's presence, or change deployment settings as part of a review.
- Report actionable defects introduced or exposed by the change with a precise changed-line location, trigger, required capability, violated invariant and concrete impact. Explain configuration-dependent findings using supported preconditions. Do not report hypothetical deployments, missing context, unrelated pre-existing issues or generic hardening suggestions as PR defects.
- Follow the requested review output format. Separate confirmed findings from relevant validation limits, state which checks actually ran when the format permits, and return no findings when no actionable defect is established.
| ID and STRIDE category | Scenario and invariant |
|---|---|
| S1 · Spoofing | A pending second factor, disabled account or service identity could be treated as a fully authenticated person. Preserve account refresh and complete authentication checks in every session consumer. Authentication · User provider |
| T1 · Tampering | Moving, replacing or restoring an element can cross workspace boundaries. Check authority for the action on both source and destination and preserve relevant workspace restrictions across restore and retry. WebDAV tree · Cross-directory move regression test |
| R1 · Repudiation | Scheduled publishing and bulk jobs can lose the initiating identity. Preserve attribution across enqueue, execution, retry and audit output. Trace the recorded actor and audit fields in code; treat production retention as an external assumption unless configuration is supplied. Scheduled tasks · Application logger |
| I1 · Information disclosure | Drafts, derivatives, reports and cached personalized responses can cross audience boundaries. Check disclosure policy at publication, preview, export, storage origin and cache hits. Document router · Storage configuration |
| D1 · Denial of service | Large inputs, distinct renditions and retried jobs can exhaust processing or storage capacity. Bound per-operation cost, concurrency, persistent output and retry behavior. PDF scanner · Thumbnail service |
| E1 · Elevation of privilege | A new route, content renderer or worker could inherit authority from a broad role check or a trusted execution context. Verify the initiating identity, target, action, workspace and workflow at the authoritative boundary. Element permissions · Permission cache tests |
| E2 · Elevation of privilege | Uploaded bytes, content metadata and imported configuration reach interpreters, template helpers, subprocesses or privileged setters. Preserve the separation between data and executable instructions, keep code and schema writers privileged, and scope deserialization to the expected types. Twig policy · Serialization · Class builder |
Architecture and trust boundaries
- Ingress and identity. Treat headers, cookies, route parameters, identifiers, files and imported data as untrusted. Resolve actor identity through the effective Symfony firewall. Edge, proxy and application must agree on request scheme and host. API identity, staff roles and customer identities have distinct scopes. Bootstrap · Routing
- State and publication. Protect object data, localized and inherited fields, unpublished drafts, credentials, personal information, originals and derivatives. Public URLs, static pages, CDN objects, versions, recycle bins, backups and exports each have their own delivery or retention path. Model tenant isolation explicitly where mutually distrustful tenants share a deployment. Storage mappings · Asset visibility guide
- Privileged execution. Distinguish anonymous visitors, scoped users, editors controlling content, integration identities, queue producers, operators and maintainers. Publishing, cross-workspace moves, role assignment, schema or report changes, bundle installation and release builds confer distinct authority. A worker’s operating-system identity does not establish a job’s business authorization. Scheduled tasks · Job permissions
- External services. Converters may receive asset bytes. Mail, embed providers, proxies and CDNs can receive URLs, content or credentials. Trace changed outbound calls, destination selection, credentials, TLS options and output handling. Treat off-site retention as an external assumption unless evidence is supplied. Gotenberg adapter · HTTP client factory
Core controls and automated review checks
| Surface | Behavior and evidence status | Review checks |
|---|---|---|
| Authentication, sessions and CSRF | Code verified: Core verifies password hashes and rehashes when needed. The admin-session helper restricts token deserialization, refreshes the user and rejects pending 2FA. Framework configuration sets SameSite Strict and Secure auto. Authentication · Framework defaults | Review actual firewalls, cookie attributes, session rotation and revocation, complete MFA, recovery, throttling and CSRF enforcement on state-changing routes. Verify trusted proxy and host configuration. |
| Role, workspace and workflow permissions | Code verified: The single-element check resolves actor and element-type permission, workspace decisions and workflow constraints. If neither an explicit user nor the current admin user is resolved, AbstractElement::isAllowed() returns true under the CLI SAPI before element-type, workspace or workflow checks; non-CLI callers without a user receive false. Core separates service users from interactive identities. Element permissions · Users | Exercise list, detail, related records, field exports, writes, version access and bulk actions with multiple roles. Test revocation and cache isolation. Resolve and validate the initiating actor before delegated CLI operations, reject missing actors, and pass that actor explicitly to permission checks. |
| Admin and API routes | Code verified: Core loads routes from bundles and checks an authenticated identity on the statistics route. Documented: The security concept describes Studio CSP. API behavior depends on the installed bundles. Core routes · Statistics · Security concept | Inspect affected endpoints and available firewall configuration, staff permissions, preview, impersonation, CSP, CORS, API field and relationship access, query cost and notification channels. Check whether changes expose development routes. |
| WebDAV | Code verified: The early authentication plugin protects methods including those that bypass tree lookup. The tree and file handlers implement operation-specific checks. Documented: The WebDAV guide describes the opt-in browser plugin and the CSRF implications of its POST form and browser-replayed HTTP Basic credentials. Authentication plugin · Tree · WebDAV guide | Verify TLS and authorization across read, write, move, restore and lock, including the edge routing and any browser UI. |
| Documents, DataObjects and public assets | Code verified: Core document and object routing considers publication and recognized preview context. Documented: Original assets and thumbnail storage are public by default in the deployment pattern described by the asset visibility guide. Document routes · Object routes · Asset visibility guide | Check draft, locale, inheritance, hardlink and related data visibility across APIs and caches. Verify private originals, thumbnails, temporary paths, previous versions, signed URLs and CDN access after move, restore or delete. |
| Upload and native processing | Code verified: Core detects MIME, supports type mapping and checks image pixels on relevant creation paths. PDF JavaScript scanning records a configurable scan status. Ghostscript uses scoped process controls and timeouts on specific paths. Worker handlers process thumbnails and derivatives. Asset model · Document scan handling · Ghostscript · Message handlers | Verify ingress role and type policies, upload size and processing limits, failure behavior, whether scan status gates publication, and worker isolation. Check output and temporary files across local and remote adapters. |
| SQL and XML | Code verified: Listings support bound values and accept SQL condition strings. Custom Reports validates configured fragments and quotes selected identifiers and values. Asset metadata and video paths parse XML. Listings · Report SQL adapter · Metadata XML | Trace identifiers and values independently, including user-selected sort or filter fields and persisted definitions. Verify parser-specific DTD, external entity, resource and resolver settings for XML imports, SVG and WebDAV. |
| Browser output and rendering | Code verified: Core configures HTML sanitizers. Link and Embed policies have configurable strict behavior. Embed URL sanitization is permissive by default: UrlSanitizer::isUrlAllowed() returns true unless a stricter policy is configured. Thumbnail streaming rejects noncanonical paths and applies nosniff and a restrictive CSP for identified active content. Twig sandbox applies in selected contexts. Framework defaults · Embed policy · Thumbnail service | Check raw output, attribute and URL contexts, old stored data, previews, translations, active uploads and direct CDN delivery. Check whether the affected path requires strict Embed URL validation and whether the available configuration enables pimcore.documents.editables.embed_sanitizer.strict or an appropriate custom policy. Keep output escaping and template authorization separate. |
| Network access, paths and execution | Code verified: The mail SSRF helper validates public destinations and supports DNS pinning for applicable direct cURL requests. Proxy DNS follows a separate path. Core restricts particular image and thumbnail paths and requests Symfony controller eligibility in selected routes and renderers. Serialize::unserialize() defaults to allowed_classes: true; omitting the argument is deprecated but still permits all classes. Serialization · SSRF helper · Image adapter · Editable renderer | Review each fetcher's redirects, proxy and egress, storage roots, encoded paths and symlinks. Review helper return values, custom deserialization, generated code and subprocess argument boundaries. Pass an explicit class allowlist, or false for scalar/array data, when deserializing untrusted data; do not rely on the generic helper's default. |
| Credentials, diagnostics and retention | Code verified: The encrypted field uses the Pimcore encryption secret. Distinct storage mappings exist for versions, mail and temporary data. Telemetry filters property types and can still accept scalar strings. Encrypted fields · Storage mappings · Telemetry sanitizer | Trace affected credential storage and access, encryption and rotation, expiry, logs and redaction, telemetry destinations, and retention or restore paths. Assess infrastructure permissions only where configuration is supplied. |
| Build and releases | Code verified: Composer declares framework and parser dependencies and executable hooks. The repository defines dependency auditing, static analysis and test workflows. Composer manifest · Vulnerability workflow · Codeception matrix | Inspect available manifests and lockfiles for changes to dependencies, bundles, JavaScript and native tools. Review artifact provenance, workflow references and credentials available to jobs processing untrusted changes. |
The integrator owns routing, identity policy and feature configuration. The operator owns TLS, edge and origin authorization, segmentation, execution isolation, backups and patching. The data owner defines classification, retention and incident handling. For automated reviews, inspect these responsibilities only where the changed code or supplied configuration affects them. Record relevant unavailable deployment settings as assumptions; their absence alone is not a PR defect. Deployment security guidance · Backup guidance · Private reporting policy
Regression checks derived from published advisories
- Report artifacts and spreadsheet export. Check ownership independently for generation, download and deletion, even between users with the same reports permission. Verify formula neutralization at the final CSV writer. The formatter test alone establishes record-level behavior. Report export · CSV advisory · Formatter test
- Recovery and MFA changes. Construct links from a trusted origin, keep recovery responses consistent across account states and check who may reset a target user's MFA. The linked advisories concern Studio Backend, Admin UI Classic and Core, respectively. Reset URL · MFA reset · Account enumeration
- Diagnostics and cache growth. Verify that exception context and exported logs omit credentials and cookies. Bound persistent thumbnail variants and test expiry and quota across many requests. Error logging · Thumbnail growth
- Persisted schemas and sibling paths. Follow schema metadata across import, PHP generation and SQL generation. After a fix, review sibling Twig getters, session restoration and model hydration. Preserve narrowly scoped class policies for serialized fields and check existing stored data. Class generation · Indexes · Twig · Session deserialization · Hotspotimage hydration
- Cross-bundle notification rendering. CVE-2026-115898 describes an anonymous Studio recovery request whose input became Twig template source during Core email preparation. Consult the published advisory for affected versions and fixed releases, and verify whether the relevant fix is present in the branch or deployed build under review. Preserve the source/data boundary in subjects and bodies. Pass request values as literal parameters to fixed templates and check behavior even with delivery disabled. Review newly exposed helpers and sandbox scope in nested renders. Validate the installed caller and effective lockfile. Published advisory · Core mail rendering · Nested sandbox test
Additional review checks from CWE categories
These CWE categories guide review coverage. They do not establish the affected package, reachability, severity or fix status of any individual report. Apply these checks when a PR changes the corresponding boundary.
| Trigger and CWE | Review invariant and evidence |
|---|---|
| Bulk assignment · CWE-915, CWE-349 | Use an allowlist of client-writable fields at the request boundary. Derive role, owner, workspace, identity type and publication or workflow state from trusted context or separate authorized actions. Verify the policy for nested objects, imports and partial updates. Inspect callers of generic setters as well as dedicated role and password paths. User model · Asset creation |
| Authentication signal and credential lifecycle · CWE-290, CWE-306, CWE-308, CWE-672, CWE-696, CWE-807 | Keep authentication, factor completion, authorization and privileged side effects in the intended order. Trust identity headers only from configured infrastructure. Check expired or revoked sessions, recovery tokens, jobs and signed access paths after role or account changes. Review alternate routes and early returns. Bootstrap · Authentication · User provider |
| Observable account and resource state · CWE-203, CWE-204, CWE-208, CWE-209 | Compare response status, body, redirects, externally visible side effects and elapsed-time distributions across equivalent denied cases, such as absent and inaccessible records. Treat timing as a measured property of the installed path. Review separately what errors return to callers and what diagnostics retain. Authentication · Application logger |
| Credential storage and protection · CWE-256, CWE-312, CWE-522 | Verify that password writes use the hashing path and that recoverable credentials use an approved storage and access policy. Map every copy of a secret, including versions, exports, logs and backups. Test rotation and revocation where the application supports them. User model · Password hashing · Encrypted fields |
| Redirects and external references · CWE-601, CWE-610 | Identify whether external destinations are intentional. Apply the route's destination policy after parsing and normalization. Keep user-directed navigation separate from trusted recovery or callback destinations. For a server-side fetch, also review connection and redirect policy. SEO redirect handler · SSRF helper |
| Defaults and overrides · CWE-1188, CWE-1189, CWE-693 | Review clean install, upgrade, missing settings and explicit opt-ins. Require intentional transitions when a permissive default or compatibility override affects exposure. Verify the effective configuration of optional bundles, storage adapters and edge rules. Core configuration · Storage defaults |
| File serving and dispatch · CWE-184, CWE-470, CWE-552, CWE-78 | Check that permitted identifiers and resource types map to an explicit set of targets. Review document roots, generated outputs and cache aliases for unauthorized delivery. Preserve registered-controller checks and keep external process arguments distinct from interpreter syntax. Include alternate adapters and legacy data in validation. Thumbnail service · Editable renderer · Ghostscript adapter |
Priorities for automated review
Apply these priorities to boundaries affected by the diff. Follow relevant execution paths beyond changed files, but do not turn every PR into a full deployment audit. Use repository source, supplied configuration and available test results; identify missing external evidence only when it limits a conclusion about the change.
The grouped advisory themes below guide where to look first when several changed paths need review. They are search heuristics, not evidence that a particular branch or package is vulnerable. Assign finding severity from reachable impact and required capabilities, not category frequency. A less frequent category can still contain the most severe defect in a PR.
| Review order | Diff trigger and theme | Targeted checks and evidence |
|---|---|---|
| Early when affected | Authorization: routes, element IDs, workspace operations, exports, versions, bulk actions or jobs. | Trace actor, target and action to the enforcement point. Check source and destination for moves or restores, ownership of generated artifacts, and execution-time authority in workers. Test users with the same broad role but different ownership or workspaces; a role check alone does not establish object access. |
| Early when affected | XSS: editable content, translations, previews, HTML responses, attributes, URLs or active uploads. | Trace both new input and existing stored data to the final output context. Check escaping or sanitization for that context, including raw output and alternate preview/export paths. Determine whether application response headers also cover the affected delivery path; do not assume they apply to static origins or CDNs. |
| Early when affected | SQL injection: listing conditions, sort/filter fields, report fragments or persisted schema definitions. | Separate bound values from identifiers and SQL syntax. Follow request input and stored configuration into query construction; verify identifier allowlists or quoting and the exact scope of fragment validation. Do not treat binding one value as protection for the rest of the query. |
| Early when affected | Code, command and template injection: mail rendering, Twig helpers, generated PHP, controller dispatch or subprocess arguments. | Follow input across each interpreter boundary. Distinguish template source from template data, shell arguments from embedded interpreter syntax, and registered controllers from arbitrary callables. Inspect nested renders, newly reachable helpers and processing that happens before delivery is disabled. |
| Next when affected | Path traversal and file handling: uploads, WebDAV, includes, storage keys, temporary files or derivatives. | Trace decoding, normalization and root enforcement through the final filesystem or storage operation. Check alternate adapters, symlinks where relevant, source/destination authorization and direct delivery of generated files. Establish which path bytes an attacker can control. |
| Next when affected | Unsafe deserialization: session restoration, model hydration, imports, versions or serialized fields. | Identify who can write the serialized bytes and every reachable deserialization call. Check explicit allowed classes, nested object graphs, compatibility defaults and existing persisted payloads. An allowlist on one entry point does not establish safety for sibling hydration paths. |
| Next when affected | SSRF: remote images, mail resources, embeds, converters or other outbound fetches. | Trace attacker control of scheme, host, port and redirects through resolution and connection. Check private/reserved destinations, DNS pinning where applicable, proxies and alternate transports. Distinguish URL validation from enforcement on the actual connection. |
| Next when affected | Authentication, sessions, credentials and CSRF: login, recovery, MFA, identity headers or state-changing routes. | Check factor completion, account state, session refresh/revocation, trusted recovery origins and credential handling. For browser-replayed credentials, inspect CSRF enforcement on each reachable mutation, including alternate methods and routes. |
| Next when affected | Information disclosure and redirects: errors, logs, telemetry, caches, downloads or destination parameters. | Trace sensitive data to the audience that can receive it, including cache hits and static delivery. For redirects, establish the route's destination policy and check it after parsing and normalization. Keep intentional external navigation distinct from trusted recovery or callback destinations. |
| Always consider when affected | Other boundaries: resource consumption, dependency changes or behavior outside the themes above. | Follow the changed trust boundary even if it has no matching advisory category. Check per-operation cost, concurrency, retries and persistent output for resource exhaustion; inspect changed dependency manifests, lockfiles and build hooks for concrete exposure. |
For a candidate finding, inspect sibling entry points that share the changed helper or security invariant, including alternate routes, persisted-data consumers and worker paths. Report only reachable defects introduced or exposed by the change; the category itself is not a finding.
A test failure supports a finding only when its cause is tied to the change. A passing test covers only the exercised path. If tests cannot run, use source evidence where sufficient and state the remaining uncertainty without presenting an unverified exploit as confirmed.