Skip to content
RCE Advisory Advanced CVE-2017-2872

Foscam IP Video Camera CGIProxy.fcgi Firmware Upgrade Code Execution Vulnerability

The Foscam C1 camera's firmware upgrade process lacks signature verification and uses a hardcoded AES key, allowing an authenticated administrator to upload a crafted image that executes arbitrary commands as root. An attacker with administrator credentials could run custom binaries and replace the firmware.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

Insufficient security checks exist in the recovery procedure used by the Foscam C1 Indoor HD Camera running application firmware 2.52.2.43. A HTTP request can allow for a user to perform a firmware upgrade using a crafted image.

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

Impact

An attacker with administrator credentials could execute arbitrary commands as root and replace the device firmware.

What the attacker needed

Valid administrator account

How it was found

  1. Send an HTTP multipart request to the CGIProxy.fcgi endpoint with the fwUpgrade command and valid administrator credentials.
  2. The uploaded image is stored as /tmp/upgrade.bin and passed to the FirmwareUpgrade binary.
  3. The image is decrypted with a hardcoded AES key and extracted as a tar archive.
  4. The extracted WriteFlash binary and configuration files are executed via system() calls, running commands 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 camera lets an administrator update its software by uploading a file. The camera does not check that the file really comes from the manufacturer, and the password used to unlock the file is built into the camera. So someone who knows that password can make their own update file that runs harmful commands on the camera with the highest permissions.

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

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