CMS from Scratch <= 1.1.3 (FCKEditor) Unrestricted File Upload Vulnerability
The CMS's bundled FCKEditor upload script mishandled file names with multiple extensions, so a remote user could upload a PHP script and have it executed. This allowed arbitrary PHP code execution on the server.
karmainsecurity.com
Published on karmainsecurity.com
CMS from Scratch 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 cms/FCKeditor/editor/filemanager/connectors/php/upload.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 script validated only part of a multi-part file name, so a dangerous extension slipped through the check.
Impact
A remote user could execute arbitrary PHP code on the server, potentially taking full control of the site.
What the attacker needed
Access to the upload feature; server runs PHP
The fix
The upload handler should validate the final extension of the file name and reject anything that is not an allowed type.
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 accept things like images. Here the upload script checked the file name badly when it had more than one extension, so a file that looked like an image could actually be a program the server would run. An attacker could then 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.