These kind of issues are why you do not expose your cams to the outside world or let them talk out to just anyone. You should always have your cams talk to a local server and make that local server be the access point for the cameras. To be really secure put devices that should not be talking to the outside world on their own network that blocks any any access to the outside world.
Check out these links for more info about Foscam (and the many OEM brands using their hardware ) current issues and possible fixes. Though at the time of this writing a fixed version of the firmware is not available.
Internet cameras have hard-coded password that can’t be changed
Foscam Security Cameras Full of Security Flaws
Securing Your Foscam Camera – Important Notice
The latest firmware