Researchers have discovered a bug that could affect hundreds of thousands of internet-connected devices, apps and software.

The flaw makes it possible for an attacker to remotely take control of hardware such as computers, internet routers and smartphones. Found in one of the building blocks of the internet, it could also affect websites and apps.

A patch has now been released to fix the vulnerability, but it still needs to be widely adopted.

What devices are affected?

The vulnerability affects devices that run the Linux operating system. While exact figures for how many devices may be affected are not available, they could include surveillance cameras, wireless routers, servers and internet of things devices, such as smart washing machines.

"Sometimes baby cameras run Linux as well, and they're sometimes connected to the internet," said Steven Murdoch, a security researcher at UCL. "There has been concern that these had security vulnerabilities that would allow people to access them. This is another example of those vulnerabilities."

The bug could also affect Linux computers, Bitcoin software and anything built using the Python, PHP and Ruby on Rails programming languages. Examples of services that use these languages include Dropbox, Facebook and Twitter.

Google's Android runs on Linux, but "most Android phones will not be affected because they use a different version," said Murdoch. But some Android apps could be affected.