Skip to content
RCE Write-up Intermediate

WikkaWiki <= 1.3.2 (libs/Wakka.class.php) PHP Code Injection Vulnerability

WikkaWiki's libs/Wakka.class.php script allows remote attackers to write arbitrary PHP code to the spamlog_path file via the User-Agent HTTP header in an addcomment request when spam_logging is enabled. This could lead to remote code execution.

karmainsecurity.com

Published on karmainsecurity.com

WikkaWiki contains a flaw that allows a remote user to execute arbitrary PHP code. The flaw is due to the libs/Wakka.class.php script.

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 unsanitised user input (the User-Agent header) directly into a PHP file without escaping, allowing code injection.

Impact

A remote attacker could execute arbitrary PHP code on the server, potentially leading to full compromise.

What the attacker needed

Spam_logging option enabled; ability to send HTTP requests

The fix

The vulnerability was fixed in WikkaWiki 1.3.2 according to the referenced security update.

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.

WikkaWiki is a wiki software. When a feature called spam logging is turned on, it saves information about commenters, including the browser's User-Agent string, into a file. Because the software does not clean this input, an attacker can put PHP code in the User-Agent and have it saved to a file that can later be run as a script, giving them control of 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.

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.