Seagull PHP Framework <= 0.6.4 Unrestricted File Upload Vulnerability
The Seagull PHP Framework's file upload connector mishandles filenames with multiple extensions, allowing a remote user to upload a PHP script. An attacker could then execute arbitrary PHP code on the server.
karmainsecurity.com
Published on karmainsecurity.com
Seagull PHP Framework contains a flaw that allows a remote user to execute arbitrary PHP code. The vulnerability is caused due to an error in the handling of file uploads in the tinyfck/filemanager/connectors/php/connector.php script, when a file name has multiple file extensions.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the upload validation only checks the last extension or mishandles names with multiple dots, so a file ending in a PHP extension passes as an allowed type.
Impact
A remote user could upload and execute arbitrary PHP code on the server, potentially taking full control of the web application.
What the attacker needed
Access to the file upload feature; ability to send a crafted filename
The fix
The upload handler should validate the file type properly and reject names with multiple extensions or disallowed extensions.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A file upload feature is supposed to let people send harmless files like images. Here, the code that checks the file name can be tricked by giving a file more than one extension, so a file that looks like an image is actually a program the server will run. That lets an attacker run their own code on the website's server.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.