FreeWebshop <= 2.2.9 R2 PHP Code Injection Vulnerability
The Ajax File Manager module in FreeWebshop 2.2.9 R2 and earlier allows remote attackers to inject arbitrary PHP code into data.php through the selected document parameter. An attacker could use this to execute arbitrary PHP code on the server.
karmainsecurity.com
Published on karmainsecurity.com
Static code injection vulnerability in ajaxsavename.php in the Ajax File Manager module in the tinymce plugin in FreeWebshop 2.2.9 R2 and earlier allows remote attackers to inject arbitrary PHP code into data.php via the selected document, as demonstrated by a call to ajaxfilecut.php and then to ajaxsavename.php.
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 ajax_save_name.php script writes user-supplied input into a PHP file without sanitising it, so the input becomes executable code.
Impact
An attacker could inject and execute arbitrary PHP code on the server, potentially taking full control of the web application.
What the attacker needed
FreeWebshop 2.2.9 R2 or earlier with Ajax File Manager; network access to the application
How it was found
- Call ajax_file_cut.php to select a document.
- Call ajax_save_name.php with a crafted name to write PHP code into data.php.
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.
This is a flaw in an old shopping cart program. A part of it that handles file names lets someone write their own PHP code into a file the server later runs. That means an attacker could make the server do whatever they want, such as run commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.