Skip to content
RCE Advisory Intermediate CVE-2018-3953CVE-2018-3954CVE-2018-3955

Linksys ESeries multiple OS command injection vulnerabilities

Multiple OS command injection vulnerabilities exist in Linksys ESeries routers because user-supplied configuration values are stored in NVRAM and later passed unsanitised to system commands. An authenticated attacker could execute arbitrary commands on the device, leading to full control.

Jared Rittle Follow

Originally disclosed on Cisco Talos

High 7.2 View original

Multiple exploitable operating system command injections exist in the Linksys ESeries line of routers. Specially crafted entries to network configuration information can cause execution of arbitrary system commands, resulting in full control of the device.

Jared Rittle, on Cisco Talos

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

User-controlled configuration values are stored in NVRAM and later retrieved and inserted directly into shell commands via sprintf/snprintf and system() without sanitisation.

Impact

An authenticated attacker could execute arbitrary system commands, resulting in full control of the device.

What the attacker needed

Authenticated access to the router's web interface

The fix

The vendor released patches for both the E1200 and E2500 models.

How it was found

  1. Authenticate to the router's web interface (or use the HNAP1 login to obtain a session).
  2. Send a POST request to apply.cgi with a crafted value in the machine_name or wan_domain parameter.
  3. The value is stored in NVRAM via nvram_set.
  4. The httpd process sends SIGHUP to PID 1 (preinit), triggering a service restart.
  5. preinit retrieves the stored value and passes it to system() in start_lltd or set_host_domain_name, executing the injected command.

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 router's web interface lets you set things like the router name or domain name. The router saves these values and later uses them to build system commands without checking for special characters. An attacker who can log in can insert extra commands that the router then runs, giving them control of 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.

More by Jared Rittle

View all

64 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.