Skip to content
RCE Write-up Advanced

Critical RCE patched in Imunify360 affects up to 50M+ websites

The Imunify360 antivirus scanner (AI-bolit) ran attacker-supplied obfuscated PHP through its deobfuscation logic, which called function names recovered from the payload without validation. An attacker could therefore get the scanner to run arbitrary system commands or PHP code, and the later database-scanner variant meant only the ability to write to a database was needed.

patchstack.com

Published on patchstack.com

A critical RCE vulnerability has been patched in Imunify360 AV. Hosting companies should patch the issue immediately & check servers for signs of compromise.

The author, on patchstack.com

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

The deobfuscation logic passed function names recovered from untrusted files into a wrapper around call_user_func_array without checking that those functions were safe.

Impact

An attacker could execute arbitrary commands or PHP code, ranging from website compromise to full server takeover depending on how the scanner is deployed and its privileges; the database-scanner variant needs only the ability to write to the database, such as posting an unapproved comment.

What the attacker needed

Scanner runs with deobfuscation enabled; ability to plant a file or write to a scanned database; scanner version before v32.7.4.0

The fix

The vendor patched it by validating any discovered function against a whitelist of pure decoding functions before executing it.

How it was found

  1. Place a crafted obfuscated PHP file where the scanner will analyse it, or write the payload into a database the scanner reads.
  2. Run the AI-bolit scanner with deobfuscation enabled against that file.
  3. The deobfuscator extracts the function name from the payload and calls it, executing the attacker's command.

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.

A malware scanner tries to read scrambled (obfuscated) code so it can understand what a suspicious file does. Here the scanner was tricked into actually running the code it was meant to inspect, so whoever wrote the file could make the server run their commands. Because the scanner often runs with high privileges on hosting servers, that could mean control of the whole machine, not just one website.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.