Skip to content
RCE Write-up Intermediate

WeBid <= 1.0.2 (includes/converter.inc.php) PHP Code Injection Vulnerability

User-supplied input sent through the 'from' and 'to' POST parameters to converter.php was not properly sanitised before being written into a PHP include file. A remote attacker could inject and execute arbitrary PHP code on the server.

karmainsecurity.com

Published on karmainsecurity.com

WeBid contains a flaw which allows a remote attacker to inject and execute arbitrary PHP code. The issue is due to user-supplied input passed via the ‘from’ and ‘to’ POST parameters to converter.php is not properly sanitized before being stored in includes/currencies.php.

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 converter script wrote POST values into a PHP source file without escaping them, so injected PHP syntax became executable code.

Impact

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

What the attacker needed

Network access to converter.php; no authentication stated

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 small PHP auction script. A page that converts currencies took text from the visitor and saved it into a PHP file that the site later runs. Because the text was not cleaned, someone could put PHP code in that field and the server would run it, giving them control of the site.

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.