Netgate pfSense system_advanced_misc.php multiple remote command injection vulnerabilities
Three POST parameters on the pfSense administration page for miscellaneous system settings were passed unsanitised into a shell command run by the powerd helper. An authenticated administrator could inject extra shell commands and run them on the firewall as the web interface user.
Originally disclosed on Cisco Talos
Three exploitable command injection vulnerabilities exists in the way Netgate pfSense CE 2.4.4-RELEASE processes the parameters of a specific POST request. The attacker can exploit this and gain the ability to execute arbitrary commands on the system.
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 POST parameters powerd_normal_mode, powerd_ac_mode and powerd_battery_mode are stored in the config and then concatenated into a shell command passed to mwexec() without escaping or validation.
Impact
An attacker with authenticated access to the administration web interface could execute arbitrary commands on the firewall.
What the attacker needed
Authenticated admin access to the web interface
How it was found
- Send an authenticated POST request to the system_advanced_misc.php page with powerd_enable set to yes.
- Include a crafted value in the powerd_normal_mode, powerd_ac_mode or powerd_battery_mode parameter.
- The page saves the value and calls activate_powerd(), which builds the powerd command line.
- The command line is executed through mwexec(), running the injected commands.
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 firewall's admin page takes values from a form and builds a text command for the operating system. Because the values are pasted straight into that command, someone who can log in as admin can add their own extra commands. The result is that they can run anything on the device, not just change power settings.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.