How to Protect Your Devices From New Hack Threat

computer hacker
Comstock Images | Getty Images

Millions of internet-connected devices are vulnerable to a new hack that allows cyber criminals to access all your personal information, smartphone or tablet, security firm Rapid7 said on Tuesday.

(Read More: New Hack Threat Leaves Millions at Risk of Cyber Attack )

The hack is possible because of a component called Universal Plug and Play (UPnP), a function that enables connected devices—like personal computers, routers, IP cameras, smart TVs, printers, media servers, DVRs and smart appliances— to easily be discovered on a wireless network for a speedy set-up and allows devices to communicate with each other.

While the component is meant to make communication between connected devices seamless, it is also the source of dangerous security flaws that may affect up to 50 million devices that are connected to the internet, according to Rapid7's report.

(Read More: Pentagon in Major Expansion of Cybersecurity Force )

The problem stems from internet routers, which usually have the function enabled as a default setting when purchased, HD Moore, Rapid7's chief security officer, said Tuesday.

Basically, if the component is left enabled on a router—or any other device with the feature—hackers have a direct way into your computer or other devices on your network and could steal passwords, documents, view your web history or even take remote control of your security systems, computer, webcams, printers or any other device connected to the internet.

The only way to protect your devices is to make sure that the UPnP is disabled, Moore said.

Since the most common device affected are routers, you should start there. You can see if your router has the UPnP component turned on by using a free tool on Rapid7's website called 'ScanNow.'

(Read More: 10 Ways Companies Get Hacked )

To disable the setting, type the router's IP address, which is usually found on the bottom of the router, into your web browser. After you hit return, a web page will appear where you can enter the username and password and access your router settings. Find where the UPnP setting is located and then select 'disable.'

Turning off the function shouldn't affect any of the devices already connected to your network. Disabling the feature simply stops any devices from requesting information from each other without your approval first.

The 'ScanNow' tool will also show you what other devices on your network might be at risk to security vulnerabilities caused by not having the function turned off. However, disabling the setting on other connected electronics differs from device to device.