Describe the issue or problem
We experienced a security incident on our OJS installation. An unauthorized third party managed to place a .php file inside the application’s cache directory. This allowed the creation of a cron task on the underlying Linux server, which was used to download an external file and further exploit the system.
We expected the file upload/review workflow to reject or safely handle any non-permitted file type, preventing any script from being written to or executed from the cache directory.
Steps I took leading up to the issue
- Reviewed submission/review file upload logs around the time the malicious file appeared in the cache directory.
- Identified that the entry point appears to be related to the file upload functionality used during the submission/review workflow (e.g., reviewers/authors uploading revision files, editors uploading production files).
- Took the site offline as immediate containment to prevent further impact on the server and other co-hosted services.
- Upgraded the installation from 3.4.0.10 to 3.5.0.5 (latest stable) as part of remediation.
- Implemented two-factor authentication (2FA) as an additional security layer.
What application are you using?
OJS 3.4.0.10 at the time of the incident. Currently upgraded to OJS 3.5.0.5.
Additional information
We suspect insufficient validation or restriction on uploaded file types/extensions allowed a disguised or executable file to be written to a web-accessible or otherwise exploitable path, eventually reaching the cache directory.
We’d appreciate guidance on:
- Whether this matches a known vulnerability/CVE for OJS 3.4.x related to file upload validation or the cache directory being writable/executable.
- Specific hardening recommendations for the cache/ and public/ (or uploads) directories in terms of filesystem permissions and web server configuration (e.g., disabling PHP execution in upload/cache directories via .htaccess or nginx location rules).
- Whether 3.5.0.5 includes specific fixes addressing file upload validation that would mitigate this attack vector, or if this is primarily a server-hardening issue independent of the OJS version.
- Recommended file-type/extension allowlists or additional validation layers beyond what ships by default.
We checked the related threads “Securing files_dir via .htaccess in OJS 2.4.8.1” and “Cannot upload File on OJS 3.4.0.8 (Abstract issue)” suggested by the forum, but neither fully covers this specific attack path, so we’re opening a new topic.
Any guidance, related threads, or official security advisories would be greatly appreciated.