CVE-2025–41688: Bypassing Restrictions in an OT Remote Access D
An undocumented Lua function called misc_exec allowed execution of arbitrary OS commands as root, bypassing the Lua sandbox. An attacker with web login could achieve full device takeover.
Marcel Rick-Cen | FOXGRID Follow
Published on medium.com
This OT remote access device is trusted across OT environments in Europe to maintain PLCs, HMIs, and field devices. Under the hood, it runs embedded Linux, exposes a web interface, and offers Lua scripting for automation and diagnostics.
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 an undocumented native binding (misc_exec) was exposed in the Lua environment without proper sandboxing, allowing direct OS command execution.
Impact
An attacker with web login could execute arbitrary commands as root, leading to full device takeover, persistent remote code execution, and potential pivoting to other hosts.
What the attacker needed
Web login to the device
The fix
The vulnerability was acknowledged by the vendor, but the device is end-of-life; users should segment devices and audit scripting access.
How it was found
- Access the device's web interface and log in.
- Use the Lua scripting field to submit a script that calls the misc_exec function with a command.
- Save the script and start it.
- Retrieve the command output via the provided output endpoint.
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 device runs a scripting language called Lua for automation. The script environment was supposed to be restricted so scripts couldn't run system commands, but a hidden function called misc_exec let anyone who could log in run any command as the all-powerful root user, taking over the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.