GeoVision LPC2011/LPC2211 DdnsSetting.cgi OS command injection vulnerability
The DDNS settings endpoint stores user-supplied fields without sanitisation and writes them into the ez-ipupdate configuration file, so line breaks in a field can add new configuration entries. An attacker who can reach the endpoint as admin could inject an execute entry and run commands as root after a successful DDNS update.
Originally disclosed on Cisco Talos
A OS command injection vulnerability exists in the DdnsSetting.cgi functionality of LPC2011/LPC2211 (version(s): 1.10). A specially crafted DDNS configuration can lead to arbitrary command 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
Likely the DDNS fields are copied into the ez-ipupdate configuration file without escaping or rejecting newline characters, allowing extra configuration directives to be injected.
Impact
An attacker with admin access could run arbitrary commands as root on the device, though the endpoint is only reachable by an admin, so valid credentials or a login bypass are needed first.
What the attacker needed
Admin credentials or a login bypass; network access to the web interface
The fix
The vendor released a patch; the underlying fix is to sanitise or reject line breaks and special characters in the DDNS fields before they are written to the configuration file.
How it was found
- Send a request to DdnsSetting.cgi with DDNS settings, placing line breaks in a field such as the hostname.
- The values are stored in the settings object and passed to the ipcamd service.
- ipcamd builds the ddns.conf file from those values without sanitisation.
- The injected lines add an execute entry and point the update at an attacker-controlled server.
- On a successful DDNS update the injected command runs as root.
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.
This device lets an administrator set up a dynamic DNS service, which keeps a hostname pointed at the device's changing address. The page that saves those settings copies the text straight into a configuration file for a helper program, and that program can be told to run a shell command after each successful update. Because line breaks in a field start a new line in that file, someone could add such a command themselves.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.