The issue arises from the lack of file validation for uploads and the absence of authorization and CSRF protection in an AJAX action handling file uploads. This allows any authenticated user, such as a subscriber, to upload arbitrary files, including PHP files, to the server.