Invision Community <= 5.0.6 (customCss) Remote Code Execution Vulnerability
The theme editor's custom CSS handler passes user-supplied content into a PHP code-generation function without proper sanitisation, allowing an attacker to inject and execute arbitrary PHP code. An authenticated attacker with access to the theme editor could achieve remote code execution on the server.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerability is located in the /applications/core/modules/front/system/themeeditor.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 customCss() method passes unsanitised user input into Theme::makeProcessFunction(), which generates executable PHP code, allowing code injection.
What the attacker needed
Access to the theme editor; authenticated user
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 a forum software's theme editor. When you save custom CSS, the software builds a piece of PHP code from your input. Because it does not clean the input properly, someone who can use the theme editor can sneak in their own PHP commands, which the server then runs. That lets them run code on the server, not just change colours.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.