Skip to content
Memory corruption Advisory Advanced CVE-2017-2831

Foscam IP Video Camera CGIProxy.fcgi Query Append Buffer Overflow Vulnerability

A buffer overflow exists in the Foscam C1 camera's CGIProxy.fcgi service when handling a crafted query string. An attacker could send a specially crafted HTTP request to overwrite memory and potentially execute arbitrary code.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable buffer overflow 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 cause a buffer overflow resulting in overwriting arbitrary data.

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

The service copies the decoded query string into a 0x400-byte global buffer and then appends additional strings without checking the total length, causing a buffer overflow.

What the attacker needed

Network access to the camera's web interface

How it was found

  1. Send an HTTP GET request to the CGIProxy.fcgi endpoint with a query string containing a remoteP2P parameter.
  2. Make the remoteP2P parameter value long enough to fill the 0x400-byte buffer.
  3. The service appends remoteIp= and the process ID to the buffer, overflowing it.

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 is a memory corruption bug in a security camera's web interface. The program copies a user-supplied string into a fixed-size buffer without checking if it fits, so a long input spills over into adjacent memory. An attacker on the network could send a crafted request to crash the device or possibly run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.