IPS Community Suite <= 4.1.12.3 Autoloaded PHP Code Injection Vulnerability
The content_class request parameter was concatenated into a class name and passed to PHP's class_exists() function without proper sanitisation. An attacker could supply a crafted value so that an arbitrary class is autoloaded, leading to PHP code injection.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerable code is located in the /applications/core/modules/front/system/content.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 application built a class name directly from user input and passed it to class_exists(), which triggers autoloading of an attacker-influenced class.
What the attacker needed
Access to the content endpoint; a suitable autoloadable class exists
The fix
The content_class value should be validated against a fixed allowlist of permitted class names before it is used, rather than being concatenated into a class name.
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.
PHP can automatically load a class file when code refers to a class that has not been loaded yet; this is called autoloading. Here the site built that class name from a value the visitor controls, so a visitor could make the site load a class of their choosing. If a suitable class exists, its code runs, which can mean the attacker's code executes 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.