A security vulnerability has been identified in the User Submitted Posts WordPress plugin , specifically in versions 20230902 and earlier. This vulnerability allows unauthorized users to upload arbitrary files  , including phtml files , which can lead to remote code execution .
The flaw resides in the uspattachimages function of the plugin, which is called from the uspcreatePublicSubmission function . The uspcheckimages function is responsible for validating uploaded image files . However, the filename check can be bypassed by uploading a valid image file with an added PHP script payload and using phtml as the file extension . Although there is a condition that checks the file type using the wpcheck_filetype function , a race condition technique can be utilized to trigger the code execution .
This vulnerability has been assigned CVE-2023-45603. Plugin Planet has addressed this issue by releasing a patch in version 20230914 of the plugin. It is highly recommended that users update their installations immediately. Additionally, website owners should conduct a thorough code audit to identify any potential vulnerabilities and maintain a whitelist of allowed file extensions to prevent arbitrary file uploads.
The discovery of this security vulnerability highlights the importance of regularly updating software and conducting code audits to ensure the security of websites. By promptly applying the patch provided by Plugin Planet, users can mitigate the risk of remote code execution. Going forward, it is crucial for website owners to maintain a proactive approach to security, including implementing measures such as whitelisting allowed file extensions, to prevent similar vulnerabilities from being exploited.