Skip to content
RCE Write-up Intermediate

phpMyFAQ <= 2.7.0 (ajax_create_folder.php) PHP Code Injection Vulnerability

A static code injection flaw in the Ajax File and Image Manager component used by phpMyFAQ allowed remote attackers to inject arbitrary PHP code into a data file via crafted parameters. This could let an attacker execute their own PHP 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 application writes user-supplied parameters directly into a PHP file without sanitising or escaping them, so the input becomes executable code.

Impact

An attacker could run arbitrary PHP code on the server, potentially taking full control of the application and its data.

What the attacker needed

Network access to the vulnerable endpoint

The fix

The vulnerability was fixed in later versions of the affected products (phpMyFAQ 2.6.19, 2.7.1, and Ajax File and Image Manager 1.1).

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 where a web application takes input from a user and writes it into a file that is later run as code. Because the input is not cleaned, an attacker can put their own programming instructions into that file, and the server will run them. That gives the attacker control over what the server does.

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.