OS4Ed openSIS install remote code execution vulnerability
The openSIS installer writes user-supplied database credentials into a PHP configuration file without proper sanitisation, allowing an attacker to inject and execute arbitrary PHP code. An attacker can exploit this by running a malicious MySQL server and submitting crafted username or password values, leading to remote code execution.
Originally disclosed on Cisco Talos
A remote code execution vulnerability exists in the install functionality of OS4Ed openSIS 7.4. A specially crafted HTTP request can lead to remote code execution.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The installer fails to sanitise user-supplied username and password values before writing them into a PHP file, allowing PHP code injection.
Impact
An attacker could execute arbitrary PHP code on the server, leading to full remote code execution.
What the attacker needed
Install directory accessible; attacker-controlled MySQL server; no authentication required
The fix
The installer should sanitise or escape user-supplied values before writing them into the PHP configuration file, and the install directory should be removed after installation.
How it was found
- Access the installer at the /install URL without authentication.
- Provide connection details for a MySQL server that the attacker controls, started with skip-grant-tables.
- Enter a crafted username or password containing PHP code.
- Complete the installation, which writes the malicious code into Data.php.
- Visit the installed site to trigger execution of the injected PHP code.
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 report has not been written yet. The Original tab links to the source.
The installer for openSIS saves the database username and password you type into a file that the website later runs as code. Because the installer does not clean these values, an attacker can type special characters that break out of the intended text and add their own code. When someone visits the site, that code runs on the server, giving the attacker control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.