Deciso OPNsense diag_backup.php filename Command Injection Remote Code Execution Vulnerability
A backup configuration file handling routine in OPNsense passed a user-supplied string into a system call without proper validation. An authenticated attacker could use this to run arbitrary commands as root on the appliance.
Originally disclosed on Zero Day Initiative
This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of Deciso OPNsense. Authentication is required to exploit this vulnerability.
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
Likely, a filename or similar user-controlled value was concatenated into a shell command in the backup handling code without sanitisation or escaping.
Impact
An authenticated, network-adjacent attacker could execute arbitrary code as root on the affected installation.
What the attacker needed
Valid login on the appliance; network access to the appliance
The fix
The vendor issued an update to correct the vulnerability; the linked commit shows the code change.
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.
OPNsense is a firewall and router product. A part of it that handles backup files took text supplied by a logged-in user and handed it to the operating system as a command, without checking it first. That means someone with a login could slip in extra commands and have them run with the highest level of permission on 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.