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

Foscam IP Video Camera webService dyndns.com DDNS Client Code Execution Vulnerability

A buffer overflow exists in the DDNS client of Foscam C1 cameras when using the dyndns.com provider. An attacker who can intercept HTTP traffic could run a rogue server to send a crafted response and execute code on the device.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.1 View original

An exploitable buffer overflow vulnerability exists in the DDNS client used by the Foscam C1 Indoor HD Camera running application firmware 2.52.2.43. On devices with DDNS enabled, an attacker who is able to intercept HTTP connections will be able to fully compromise the device by creating a rogue HTTP server.

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

Root cause

The DDNS client copies characters from the HTTP response into a fixed-size buffer without checking the buffer's size, leading to a classic buffer overflow.

What the attacker needed

DDNS enabled with provider dyndns.com; attacker can intercept HTTP traffic

How it was found

  1. Configure the camera to use DDNS provider number 4 (dyndns.com) via the web interface or CGI command.
  2. Intercept the camera's HTTP request to checkip.dyndns.com.
  3. Respond with a crafted HTTP response containing '200 OK', '\r\n\r\n', 'Current IP Address: ', a long string of characters, and a '<' terminator.
  4. The camera copies the long string into a fixed-size buffer, causing a buffer overflow and potentially code execution.

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 regularly contacts a website to check its public IP address. The camera does not limit how much data it copies from the website's reply into a small memory buffer. An attacker who can intercept that connection can send a very long reply, overflow the buffer, and take control of the camera.

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

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.

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.