Summary
Camaleon CMS has a missing authorization check in its media controller, allowing low-privileged authenticated users to access media actions despite role-based Media permissions. Depending on the action, an attacker may upload files, read private media, or change other users' avatars.
Affected context
The issue occurs in Admin::MediaController in affected Camaleon CMS deployments. The media upload, private-file download, and avatar-cropping actions may be reachable by authenticated users whose roles should not grant the corresponding Media permissions.
Exploit preconditions
- Attack surface: Admin media endpoints, including
/admin/media/upload,download_private_file, and the crop action - Required access: A low-privileged authenticated account
- Trigger point: A request to a media action that does not enforce the required role-based permission
- Why exploitation is possible: The affected actions lack authorization checks that properly restrict access according to the user's Media permissions
Why this happens
The controller allows access to sensitive media operations without consistently verifying that the authenticated user is authorized to perform them. This is a missing authorization control, mapping to CWE-862: Missing Authorization. Authentication alone is not sufficient to establish permission to upload files, read private media, or modify another user's avatar.
Potential impact
- An attacker may store unauthorized files through the media upload endpoint.
- An attacker could access private media that should be restricted.
- An attacker may change avatars belonging to other users.
- Unauthorized media operations could undermine user privacy and the integrity of CMS content.
General mitigation guidance
Defensive patterns focus on enforcing authorization at every sensitive action, rather than relying on authentication or UI-level restrictions alone.
- Apply explicit, server-side permission checks to each media operation.
- Deny access by default when a user's authorization cannot be established.
- Derive permissions from trusted server-side identity and role data, not request parameters.
- Restrict private-file access to users authorized for the specific resource.
- Limit the runtime privileges and filesystem access available to media-handling components.
How teams detect issues like this
Review controller actions and routes for media operations that lack centralized or explicit authorization checks.
- Use static analysis or code review rules to flag sensitive actions without permission enforcement.
- Test access control across roles, including attempts to upload, download private media, and change another user's avatar.
- Enforce policies requiring server-side authorization checks for file and account-related operations.
- Monitor logs for media actions that are inconsistent with a user's assigned permissions.

