GHSA-332x-r494-54fq: Pimcore has a WordExport Authorization Bypass for Unauthorized Document Export
SummaryThe `WordExport` export flow only checks whether the current backend user has the feature permission `word_export`. It does not verify access rights on the target element itself.  
As a result, a low-privileged backend user can export document content even when the user does not have `view` permission on that document.In the local Docker reproduction, a low-privileged user successfully exported sensitive content from a page the user was not allowed to view:`POC-WORDEXPORT-TITLE``POC-WORDEXPORT-DESC`Root CauseThe controller only performs a feature-level permission check before starting the export flow:[[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L41)](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L44)#L41)[TranslationController.php](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L56)#L44)It then directly resolves the target element from attacker-controlled `type/id` input:[[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L58)](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L56)[[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L72)](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L113)#L58)For document-like elements such as `Page` and `Snippet`, it renders content in an admin context:[[TranslationController.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L114)](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L72)[TranslationController.php](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L113)[TranslationController.php](pimcore-12.3.3/bundles/WordExportBundle/src/Controller/TranslationController.php#L114)No object-level authorization check such as `isAllowed('view')` is enforced on the target element.Affected ScopeBased on the source code, the following element types may be affected:`page``snippet``email``object`For page-like documents, the `pimcore_admin = true` rendering context may expose additional backend-visible content.PreconditionsThe attacker is an authenticated backend userThe attacker has the `word_export` permissionThe attacker does not have `view` permission on the target documentReproduction EnvironmentReproduction root: `pimcore-12.3.3-repro`Standalone PoC script: [[poc_wordexport.php](https://github.com/pimcore/pimcore/security/advisories/pimcore-12.3.3-repro/tools/poc_wordexport.php)](pimcore-12.3.3-repro/tools/poc_wordexport.php)Reproduction StepsCreate a low-privileged user named `auditor_wordexport` with only the `word_export` permission and no document workspace permissions.Create a test page at `/poc-wordexport-secret-page` containing sensitive values:`title = POC-WORDEXPORT-TITLE``description = POC-WORDEXPORT-DESC`Verify that the user does not have `view` permission on that page.Execute `wordExportAction()` and `wordExportDownloadAction()` as that user.Check whether the exported HTML contains the sensitive values.Reproduction command:Reproduction ResultRelevant PoC output:This shows that:The user cannot view the target pageThe exported file still contains the page's sensitive contentThis confirms that the issue is practically exploitable.Security ImpactUnauthorized disclosure of structured page fieldsUnauthorized export of restricted backend contentPotential exposure of unpublished or otherwise restricted contentLateral data access by low-privileged backend accountsRemediationPerform object-level authorization immediately after resolving the element from `type/id`.Require at least `view` permission on the target element.Apply consistent authorization checks across `page`, `snippet`, `email`, and `object`.Bind export creation and export download to the requesting user or an equivalent authorization context.Add regression tests to ensure that users with `word_export` but without element `view` permission cannot export content.
CVSS v3.1: 6.4