Summary
UnoPim contains an authenticated arbitrary file upload vulnerability in the TinyMCE image upload endpoint. An administrator who can access the endpoint may upload a PHP file to publicly accessible storage and execute operating system commands when the file is requested through its returned URL.
Affected context
The vulnerability occurs in UnoPim deployments where the TinyMCE image upload endpoint accepts administrator-uploaded files without reliably validating both their extensions and MIME types. Risk is increased when uploaded content is stored on a publicly reachable disk that can be processed as server-side executable code.
Exploit preconditions
- Attack surface: TinyMCE image upload endpoint
- Required access: Authenticated administrator privileges or equivalent access to the upload function
- Trigger point: Upload processing followed by a request to the stored file's public URL
- Why exploitation is possible: Missing extension and MIME type validation permits server-side script files to be stored in a location where the web server may execute them
Why this happens
The underlying bug is insufficient validation and handling of user-controlled file uploads. The endpoint treats uploaded content as an image without enforcing a strict allowlist of extensions, verified content types, and non-executable storage rules. This maps to CWE-434: Unrestricted Upload of File with Dangerous Type, in which an application permits a dangerous file type to be uploaded into an execution-capable location.
Potential impact
- An attacker may execute arbitrary operating system commands with the privileges of the web server process
- The application and its underlying host could be compromised
- Sensitive data may be accessed, modified, or removed
- Uploaded content could be used to establish persistence or facilitate lateral movement
- Application integrity and availability could be affected
General mitigation guidance
Mitigation generally focuses on reducing trust in uploaded content and ensuring that user-controlled files cannot become executable server resources.
Common defensive patterns include:
- Allowing only narrowly defined image formats and validating file content in addition to filename metadata
- Renaming uploaded files and removing user-controlled path components
- Storing uploads outside executable web roots or using a storage service that serves content as inert data
- Applying server and filesystem policies that prevent script execution in upload directories
- Restricting upload functionality to the minimum required roles and applying least privilege to the application process
- Serving uploaded files with safe content-disposition and content-type policies
How teams detect issues like this
Organizations can detect this class of issue through:
- Static analysis rules that identify upload handlers lacking extension, MIME, or content-signature validation
- Code review checks for user-controlled files written beneath public or executable directories
- Tests that verify uploaded script-like content is rejected and cannot be executed
- Web server and application logs monitoring unusual upload extensions, public file access, and command-execution indicators
- Policy enforcement requiring dedicated non-executable storage for user-generated content
- Neutral automated security review tools that identify dangerous upload paths and missing validation controls

