Skip to content
RCE Write-up Intermediate

Ajax File and Image Manager v1.0 PHP Code Injection Vulnerability

A static code injection flaw in the inc/function.base.php file of Ajax File and Image Manager before version 1.1 let a remote attacker write arbitrary PHP code into data.php by sending crafted parameters. Because the injected code lands in a PHP file, an attacker could run their own code on the server.

karmainsecurity.com

Published on karmainsecurity.com

Static code injection vulnerability in inc/function.base.php in Ajax File and Image Manager before 1.1, as used in tinymce before 1.4.2, phpMyFAQ 2.6 before 2.6.19 and 2.7 before 2.7.1, and possibly other products, allows remote attackers to inject arbitrary PHP code into data.php via crafted parameters.

The author, on karmainsecurity.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

Likely the code writes user-supplied parameter values into data.php without sanitising or escaping them, so the values become executable PHP.

Impact

An attacker could inject and execute arbitrary PHP code on the server, potentially taking control of the affected application and host.

What the attacker needed

Network access to the vulnerable component

The fix

The issue was fixed in Ajax File and Image Manager 1.1, so affected users should upgrade.

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 software takes input from a web request and writes it into a file that the server later runs as PHP code. Because the input is not cleaned, someone can slip in their own PHP instructions, and the server will execute them. That gives the attacker a way to run commands on the machine.

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.