Skip to content
RCE Advisory Intermediate CVE-2017-2827

Foscam IP Video Camera CGIProxy.fcgi Account Creation Command Injection Vulnerability

The camera's account creation command builds a shell command from the supplied user name and password without properly neutralising shell metacharacters, so an authenticated user can inject commands. An attacker with valid credentials could run arbitrary shell commands on the device.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable command injection vulnerability exists in the web management interface used by the Foscam C1 Indoor HD Camera running application firmware 2.52.2.37. A specially crafted HTTP request can allow for a user to inject arbitrary shell characters during account creation resulting in command injection.

Claudio Bozzato and another member, 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

Likely the user name and password are formatted into a shell command string passed to system() with only a check for semicolons in the password, leaving other shell metacharacters usable.

Impact

An authenticated attacker could execute arbitrary shell commands on the camera, giving high confidentiality and integrity impact.

What the attacker needed

Valid credentials with user-creation rights; network access to the camera web interface

How it was found

  1. Log in to the camera with an account that has privileges to create users.
  2. Send an addAccount request to the CGI proxy with a crafted user name containing shell characters.
  3. The device builds and runs the configFTP shell command, 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 camera's web interface takes the name and password you type when creating an account and pastes them into a command it runs on the device's operating system. Because it does not clean up special characters, someone who is already logged in can sneak extra commands into those fields and have the camera run them.

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 Claudio Bozzato

View all

8 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.