CloudLinux Inc Imunify360 Ai-Bolit php unserialize vulnerability
A PHP unserialize vulnerability in the Ai-Bolit malware scanner component of Imunify360 allows an attacker to supply a crafted file that triggers deserialization of untrusted data, potentially leading to arbitrary command execution. The scanner runs with root privileges, so successful exploitation could compromise the entire server.
Originally disclosed on Cisco Talos
A php unserialize vulnerability exists in the Ai-Bolit functionality of CloudLinux Inc Imunify360 5.8 and 5.9. A specially-crafted malformed file can lead to potential arbitrary command execution.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The Ai-Bolit scanner's deobfuscation handler calls unserialize() on a base64-decoded string extracted from a scanned file without validating or restricting the classes that can be instantiated.
Impact
An attacker who can get a malicious file scanned by Ai-Bolit could execute arbitrary code with the privileges of the scanner, which runs as root, potentially leading to full system compromise.
What the attacker needed
Ability to place a file on the server; file is scanned by Ai-Bolit
How it was found
- Create a malicious PHP file containing a pattern that matches the deobfuscation signature, including a base64-encoded serialized object.
- Run the Ai-Bolit scanner in deobfuscate mode on the crafted file.
- Observe that the __destruct method of the Logger class is invoked, confirming deserialization of attacker-controlled data.
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 report has not been written yet. The Original tab links to the source.
When a program takes data from an untrusted source and turns it back into an object (a process called deserialization), it can be tricked into creating objects that run harmful code. Here, the malware scanner reads a file and deserializes part of it without checking if it is safe. Because the scanner runs as the root user, an attacker who can place a file on the server could potentially run commands with full control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.