Invision Community <= 4.7.20 (toolbar.php) Remote Code Execution Vulnerability
The admin toolbar plugin upload feature extracts a ZIP archive into a web-accessible directory and only deletes the extracted files if a plugin.js file is missing. An attacker with admin access could upload a ZIP containing a malicious plugin.js to achieve remote code execution.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerability is located in the /applications/core/modules/admin/editor/toolbar.php script.
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 handler extracts untrusted ZIP contents into a web-accessible directory and uses the presence of a specific file (plugin.js) as the only condition for keeping or deleting the extracted files, without validating the contents.
Impact
An attacker with admin privileges could upload a ZIP containing a plugin.js file to execute arbitrary code on the server, as the extracted files remain in a web-accessible location.
What the attacker needed
Admin access to the Invision Community admin panel
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 bug in forum software where an admin can upload a ZIP file to add a plugin. The software unpacks the ZIP into a folder that the web server can run, and it only cleans up if a certain file is missing. If that file is present, the uploaded files stay, so someone who can upload could put harmful code there and run it on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.