CUJO Smart Firewall static DHCP hostname command injection vulnerability
The DHCP daemon configuration on the CUJO Smart Firewall inserted a client-supplied DHCP hostname into dhcpd.conf without sanitisation, so a crafted hostname could inject configuration directives. Once the matching host was marked static, the injected directive ran an arbitrary command as root on the device.
Originally disclosed on Cisco Talos
An exploitable command injection vulnerability exists in the DHCP daemon configuration of the CUJO Smart Firewall. When adding a new static DHCP address, its corresponding hostname is inserted into the dhcpd.conf file without prior sanitization, allowing for arbitrary execution of system commands.
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 DHCP hostname from the client was written into dhcpd.conf without sanitisation, letting it break out of the host block and inject dhcpd directives such as execute.
Impact
An attacker on the monitored network could run arbitrary commands as root on the firewall, but only after the device owner marked the attacker's host as static through the app.
What the attacker needed
Attacker on the monitored network; owner marks the host static in the app
How it was found
- Send a DHCP request on the monitored network whose hostname option contains injected dhcpd configuration.
- Use the smartphone application to mark the corresponding host as a static DHCP entry.
- The remote servers generate a new dhcpd.conf containing the injected hostname and push it to the device.
- The agent writes the file to /tmp and runs /bin/dhcpd_conf, which validates it with dhcpd -t and copies it to /config/dhcpd.conf.
- The injected execute directive runs the chosen command as root, giving a listening shell.
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.
A firewall device runs a small server that hands out network settings to computers on the home network, and each computer can announce its own name. The device copied that name straight into a settings file without cleaning it, so a name containing special characters could add extra instructions. When the owner later marked that computer as fixed, the device applied the file and the extra instruction ran a command with full administrator rights.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.