4 ms·
I believe this was to mitigate certain PHP code execution and file upload exploits. It used to be fairly commonplace that file upload code was buggy, allowing y
by invokestatic 4y ago
I believe this was to mitigate certain PHP code execution and file upload exploits. It used to be fairly commonplace that file upload code was buggy, allowing you to upload arbitrary files into the web root. So people would upload “PHP shells”, which are backdoor scripts, somewhere on the web root and then navigate to that URL to execute the shell.
I think this technique still remains common to escalate getting admin on a WordPress blog to taking over the host.
- ljm 4y agoA lot of the PHP specific issues came from poor input validation and setting the uploaded file permissions to 0777. This was of course in those days before StackOverflow where you’d copy code snippets from old blogs or forum posts, same as all those snippets containing SQL injection vulnerabilities.