Skip to content
RCE Write-up Intermediate

openSIS <= 5.2 (ajax.php) PHP Code Injection Vulnerability

The ajax.php script takes the modname request parameter, splits it on a question mark, and passes the resulting pieces into an eval() call without proper sanitisation. An attacker could inject PHP code through that parameter and have it executed on the server.

karmainsecurity.com

Published on karmainsecurity.com

User input passed through the “modname” request variable is not properly sanitized before being used in an eval() call at line 99. This can be exploited to inject and execute arbitrary PHP code.

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

What the attacker needed

Network access to the openSIS instance

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.

The application builds a piece of PHP code out of whatever the user puts in a request parameter, then runs that code with eval(), which executes text as a program. Because the input is not cleaned, someone can slip in their own PHP commands and the server will run them. That usually means full control of the web 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.