Wi-Fi & home network

What Is UPnP? How It Works, the Security Risks and When to Turn It Off

UPnP is the reason your game console and printer just work on your home network. It is also the reason a single flaw can open your router to the internet.

Cysoro Security TeamPublished · 7 min read
Home routerTVPC?port opened · no passwordUPnP: any device can ask No authentication built in WI-FI & HOME NETWORK What isUPnP? Convenient — and wide open.
Quick answer

UPnP (Universal Plug and Play) is a set of networking protocols that lets devices on a local network discover each other and open ports on the router automatically, with no manual setup. It is convenient for gaming, printers and smart home devices, but it has no authentication, so malware or a vulnerable device can open ports and expose your network — most security experts recommend turning it off unless you need it.

Key takeaways

  • UPnP automates device discovery and port forwarding on your home network, so new devices connect with no setup.
  • It has no authentication: any device or program on your network can ask the router to open a port to the internet.
  • Turn UPnP off unless a specific device needs it; manual port forwarding for one device is safer than leaving it on for everything.

You plug in a new game console, and within seconds it is online, chatting with other players and downloading updates. You never opened a port, typed an IP address or touched a setting. That invisible convenience is UPnP — and it is also a hole in your router that attackers have exploited for years.

What is UPnP?

UPnP, short for Universal Plug and Play, is a set of networking protocols that lets devices on a local network discover each other and connect automatically, with no manual configuration.

It was designed for home networks, where nobody wants to configure ports by hand. When a device joins the network, UPnP lets it announce itself, learn what other devices offer, and ask the router to open the ports it needs to reach the internet. Common devices that use it include game consoles, printers, smart TVs, media servers, IP cameras and smart home hubs.

UPnP is not one protocol but a family built on standard pieces: SSDP for discovery, HTTP and XML for describing devices, and SOAP for control messages. Because it uses ordinary web standards, almost any device can implement it without special drivers.

How does UPnP work?

UPnP works in six steps: discovery, description, control, eventing, presentation and, when needed, automatic port forwarding on the router. Each step is automatic and needs no user input.

How UPnP works, step by step 1 Discovery SSDP broadcast on UDP 1900 2 Description Device shares XML details 3 Control SOAP messages send commands 4 Port forward Router opens a port, no password 5 Eventing Devices get status updates 6 Connect Traffic flows directly Step 4 is the risky one: the router opens a port for any device that asks. No login, no approval, no record you will ever see.
UPnP discovery, description, control and automatic port forwarding. Illustration by Cysoro.

Discovery uses SSDP, the Simple Service Discovery Protocol. A new device sends a broadcast on UDP port 1900 asking what services are available, and devices answer with their location. Description follows: the device fetches an XML file describing the services on offer.

Control is where the risk lives. Using SOAP messages, a device can ask the router — the Internet Gateway Device — to forward a port from the internet to itself. The router obeys without checking who asked, because the protocol has no authentication. That forwarded port then lets outside traffic reach the device directly, bypassing the firewall.

What is UPnP used for?

UPnP is used anywhere a home device needs to be reachable from the internet without manual setup: online gaming, video calls, media streaming, remote camera access and peer-to-peer file sharing.

  • Gaming: consoles use UPnP to get an open NAT type, which improves multiplayer matchmaking and voice chat.
  • Media: media servers and smart TVs discover each other so you can cast or stream without setup.
  • Smart home: hubs, cameras and speakers find each other on the network automatically.
  • Video calls and chat: peer-to-peer apps open a port so two devices can talk directly.
  • Printers and storage: network printers and NAS drives announce themselves so any computer can find them.

In each case the alternative is manual port forwarding, which most home users will never do. UPnP exists because convenience won over security at design time.

Is UPnP safe?

UPnP is not safe by design, but it is usually tolerable on a small home network with trusted devices and up-to-date firmware. The problem is that "usually tolerable" is not a security property.

The core flaw is simple: UPnP assumes every device on your local network is trustworthy, and it never checks. If one device is infected with malware, that malware can use UPnP to open ports and expose other devices — a risk AVG's UPnP guide describes in detail.

That is why CERT/CC, the US vulnerability coordination center, has urged organizations to disable UPnP on internet-accessible interfaces, and why the advice for home users is the same unless something specific needs it. Our guide to how to secure your Wi-Fi covers UPnP alongside the other router settings worth checking.

What are the security risks of UPnP?

The risks fall into three groups: the protocol itself trusts everyone, its implementations have had serious bugs, and many routers expose it to the internet by mistake.

RiskHow it worksImpact
No authenticationAny local device or program can open portsMalware exposes devices to the internet
CallStranger (CVE-2020-12695)SUBSCRIBE callback points to an arbitrary addressData theft, DDoS, port scanning; CVSS 7.5
SSDP reflectionUDP port 1900 replies amplified to a victimDevice used in DDoS attacks
Buggy implementationsFlaws in UPnP libraries such as libupnpRemote code execution on routers and devices
Exposed to the internetRouter answers UPnP requests from WANAttackers control port forwarding remotely
DNS hijackingMalware changes router DNS via UPnPTraffic redirected to fake sites

The scale is what makes this more than a theoretical concern. In 2013, Rapid7 scanned the internet and found about 81 million IP addresses responding to UPnP discovery requests, with 40 to 50 million devices vulnerable to at least one of three attack types it identified, across more than 6,900 products from 1,500 vendors.

Later flaws kept the problem alive. The CallStranger vulnerability (CVE-2020-12695), discovered by researcher Yunus Çadirci, affects the UPnP specification itself: a SUBSCRIBE request can name any delivery address, so a device can be made to send event traffic to an attacker's server or to a DDoS victim.

NVD scores it 7.5 out of 10 — see the NVD record for CVE-2020-12695. CERT/CC advised disabling UPnP on internet-facing interfaces and told manufacturers to disable the SUBSCRIBE capability by default.

UPnP vs manual port forwarding: what's the difference?

Both open a port through your router's firewall so outside traffic can reach a device inside. The difference is who decides, and whether anyone can audit it.

Manual port forwarding is a rule you create: one device, one port, one purpose, written down in the router settings where you can review and delete it. UPnP is automatic port forwarding: any device or program can create and delete rules silently, with no log you will read and no approval step.

For one game console or one media server, a manual rule takes five minutes and is strictly safer. UPnP only wins when devices change constantly — a house full of smart gadgets that come and go — and even then the safer answer is usually a segmented network, not automatic port opening.

How do I disable UPnP on my router?

Disabling UPnP takes about two minutes, and you can turn it back on if something breaks. The exact menu varies by router brand, but the steps are the same.

  1. Log in to your router. Open a browser and go to the router address, usually 192.168.1.1 or 192.168.0.1, then sign in with the admin password.
  2. Find the UPnP setting. Look under Advanced, WAN, NAT or Forwarding — it is often labelled simply "UPnP" or "Universal Plug and Play".
  3. Turn it off and save. Untick the box, click Apply or Save, and restart the router if it asks.
  4. Test your devices. Play an online game, cast to your TV and check your cameras. If one device needs a port, add a manual forwarding rule for that device only.
  5. Update the firmware. While you are in the admin page, check for a firmware update — many UPnP bugs are fixed in updates that routers never install by themselves.
Change the default admin password firstIf your router still uses the factory admin password, anyone on your network — or any malware on it — can turn UPnP back on. Change the password before you change any other setting.

Some ISP-supplied routers hide the UPnP toggle or re-enable it after a firmware update, so check it again after updates. If your router has no toggle, put the devices that need UPnP on a separate guest network or replace the router.

When should you keep UPnP on?

Keep UPnP on only if a specific device genuinely needs it and you have no manual alternative. The honest cases are narrow: a game console that needs an open NAT and whose ports you cannot forward manually, or a peer-to-peer app with no manual configuration option.

Even then, limit the exposure. Keep the router firmware updated, use a strong admin password, keep devices you do not trust off the main network, and review the router's port-forwarding list regularly for rules you did not create. If a rule appears that you cannot explain, delete it and investigate the device that created it.

For most households, the right answer is to turn UPnP off and forward ports manually for the one or two devices that need it. You lose a little convenience and gain a firewall that actually stays closed.

How do you check if your network is exposed?

Two quick checks tell you most of what you need to know. First, look at the router's port-forwarding or UPnP table in the admin page: any rule you did not create is a red flag. Second, check whether your router answers UPnP requests from the internet at all.

UPnP exposure checklist 1. Router UPnP tableAny rule you did not create? Delete it and investigate. 2. Firmware versionIs it current? Old firmware carries known UPnP bugs. 3. Admin passwordStill the factory default? Change it now. 4. Unknown devicesA device you do not recognize may be the one opening ports. If any check fails, disable UPnP and update the firmware before anything else.
Four checks that reveal whether UPnP is exposing your network. Illustration by Cysoro.

You can also find your public address with our what is my IP tool and check whether services you did not intend to expose are reachable. If you find a port open that you did not open, treat it as an incident: close it, update the router and check the devices on your network for malware.

The bottom line

UPnP trades security for convenience: it makes home devices connect with no setup, but it lets any device on your network open ports through your firewall with no authentication. The flaws found in it — from Rapid7's 40 to 50 million vulnerable devices to the CallStranger protocol flaw — are not edge cases.

Turn UPnP off, forward ports manually for the devices that truly need it, and keep your router firmware updated. If you want a broader home-network check, start with our guide to how to secure your Wi-Fi.

Frequently asked questions

What is UPnP in simple terms?

UPnP is a feature built into most home routers that lets devices on your network connect to each other and to the internet automatically, without you configuring anything. It opens ports on your router on a device's behalf.

Is UPnP safe to leave on?

It is reasonably safe on a well-maintained home network with trusted devices, but it is not safe by design: it has no authentication, so any infected device can open ports. Most security guidance says to turn it off unless you have a specific device that needs it.

What happens if I turn off UPnP?

Most things keep working. Some game consoles may show a strict NAT type, some peer-to-peer apps may connect more slowly, and a few smart devices may need manual port forwarding. You can turn it back on if something breaks.

Does UPnP affect gaming?

Yes, UPnP is what gives many consoles an open NAT type, which helps with multiplayer matchmaking and voice chat. If you turn it off, you may need to forward the specific ports your console uses instead.

Is UPnP the same as port forwarding?

No. Port forwarding is a manual rule you create on your router for one device and one port. UPnP is automatic port forwarding: any device or program can create and remove those rules without asking you.

How do I know if UPnP is on?

Log in to your router's admin page, usually at 192.168.1.1 or 192.168.0.1, and look for a UPnP setting under advanced, WAN or NAT settings. It is enabled by default on many routers.

What is the CallStranger vulnerability?

CallStranger, CVE-2020-12695, is a flaw in the UPnP specification that lets an attacker abuse the SUBSCRIBE function to make a device send traffic to an arbitrary address, which can be used for data theft or DDoS attacks. It scored 7.5 on the CVSS scale.

Should businesses use UPnP?

No. UPnP is a home-network feature and should be disabled on business networks. Businesses should use managed firewalls and explicit port-forwarding rules that are documented and reviewed.

Sources

  1. AVG — What Is UPnP and Is It Safe to Enable?
  2. PhoenixNAP — What Is UPnP (Universal Plug and Play)?
  3. CERT/CC — VU#339275 CallStranger vulnerability
  4. Dark Reading — Millions Of Networked Devices In Harm's Way
  5. JumpCloud — What is UPnP? Why Is It Still a Security Risk?
  6. NVD — CVE-2020-12695 (CallStranger)
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against CERT/CC advisories, NVD records for CVE-2020-12695 and Rapid7's UPnP research as reported by Dark Reading.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free