Skip to content
RCE Write-up Intermediate

Dokeos LMS <= 1.8.5 (tablesort.lib.php) PHP Code Injection Vulnerability

User input passed through the 'tablename_column' parameter to whoisonline.php was not sanitised before being used in a call to create_function() in tablesort.lib.php. An attacker could inject and execute arbitrary PHP code.

karmainsecurity.com

Published on karmainsecurity.com

Dokeos contains a flaw that may allow a malicious user to execute arbitrary PHP code. The issue is due to user-supplied input passed via the ‘tablenamecolumn’ parameter to the whoisonline.php script is not properly sanitized before being used in a call to the createfunction() PHP function in the…

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

The application passed unsanitised user input into create_function(), which evaluates its arguments as PHP code.

Impact

An attacker could execute arbitrary PHP code on the server, potentially taking full control of the application.

What the attacker needed

Access to whoisonline.php; control of tablename_column parameter

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.

Some web pages take values from the address bar and use them to build small pieces of code that run on the server. If those values are not checked, an attacker can slip in their own code and make the server run it. This is called code injection.

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.