Where attacks get in.
THE RISK
A form allowing file uploads, exploited to upload an executable file.
That file is then run, giving the attacker control.
WHERE IT HAPPENS
Contact forms with attachments Profile picture uploads Any application accepting files
WHAT PREVENTS IT
Restricting which file types are accepted Verifying the actual file type, not just the extension Preventing execution in upload directories Keeping applications updated
THE UPLOAD DIRECTORY POINT
Adding a rule preventing PHP execution in your uploads directory closes this route.
Any developer can add it, and many security plugins do.
WHAT TO CHECK
Whether your forms accept uploads, and what types Whether uploaded files can be executed
FOR WORDPRESS
The uploads directory should not execute PHP. Confirm it.
IF YOU FIND UNEXPECTED FILES IN UPLOADS
Particularly PHP files. That is a strong indication of compromise.
Investigate immediately.