Summary
Contao's file manager Edit-Multiple operation can bypass filemount restrictions when handling folder paths outside a user's permitted area. A backend user with permission to change the protected or syncExclude field may be able to publish restricted folders or exclude them from synchronization, potentially exposing files.
Affected context
The issue affects Contao versions 4.0.0 before 5.3.54, 5.4.0 before 5.7.17, and 6.0.0 before 6.0.6. It occurs in the backend file manager's Edit-Multiple operation when a filemount-restricted user can change the protected or syncExclude field and the operation does not adequately constrain submitted folder paths to the user's permitted filemount.
Exploit preconditions
- Attack surface: Contao backend file manager's Edit-Multiple operation
- Required access: A backend account with permission to edit the
protectedorsyncExcludefield - Trigger point: Processing folder paths supplied through the operation's IDS parameter
- Why exploitation is possible: The operation may fail to enforce the user's filemount boundary for submitted paths
Why this happens
The underlying issue is an authorization check that does not adequately restrict a bulk operation to resources within the current user's permitted filemount. This is an access control enforcement failure mapped to CWE-862: Missing Authorization. The insecure pattern is trusting a submitted resource path without independently confirming that the user is authorized to modify that resource.
Potential impact
- A restricted backend user may be able to change folder settings outside their filemount.
- Protected folders could be made publicly accessible, potentially exposing files for download.
- Folders could be excluded from DBAFS synchronization, which may affect synchronization integrity or availability.
General mitigation guidance
Defensive patterns include enforcing authorization for every target folder on the server, including during bulk operations, and deriving accessible resources from the authenticated user's permissions rather than trusting submitted paths. Keep access to sensitive folder fields limited to users who need it, use least-privilege backend roles, and default to denying operations when authorization cannot be established.
How teams detect issues like this
- Review bulk file-manager operations for server-side authorization checks on every affected folder.
- Use static analysis and code review to identify resource updates driven by request parameters without ownership or permission checks.
- Add tests and policy checks confirming that users cannot modify folders outside their filemount, including through bulk operations.
- Monitor backend activity for changes to protected or synchronization settings on folders outside an account's expected scope.

