Security

Should you disable UPnP? What the risk actually is

The advice online is split because the two sides are describing different threats. Here is what UPnP really does, and how to check your own router instead of guessing.

Search for UPnP and you will find two confident camps. One says disable it immediately because it is a gaping security hole. The other says leave it alone because your console will break and the risk is overstated. Both are partly right, and the reason they talk past each other is that they are describing different threats.

Here is what UPnP actually does, which of the scary stories are real, and how to check your own router in a few minutes rather than taking anyone's word for it.

What UPnP actually does

The part people argue about is one specific piece: the Internet Gateway Device profile. It lets a program on your network ask the router to open a port and forward it inward, automatically, with no configuration and no password.

That is genuinely useful. A game console asks for the ports it needs and gets a proper connection instead of a degraded one. A voice application arranges direct audio instead of relaying through a server. A file transfer sets up an inbound path without anybody editing router settings. All the things that used to require manual port forwarding happen on their own.

NAT-PMP and its successor PCP, which Apple devices use, do the same job with a simpler protocol. The trust model is identical, so everything below applies to them too.

And that trust model is the crux of the whole debate: the router does not authenticate the request. Anything on your local network can ask for a port and get it. There is no password, no prompt, and usually no log entry you would ever look at.

The risks that are real

Any device on your network can open a hole, including the ones you do not trust

This is the honest core of the argument. If a device on your network is compromised, UPnP hands it the ability to expose itself, or anything else it can reach, to the internet without asking you.

That matters more now than it did a decade ago, because of what is on a typical home network. A phone running software from a reputable app store is one thing. A budget smart plug, a camera from an unfamiliar brand, or a device whose last firmware update was three years ago is another. Those are exactly the devices most likely to be compromised and exactly the ones UPnP trusts equally.

UPnP exposed on the WAN interface

This one is not theoretical and it has affected millions of routers. UPnP is supposed to listen only on the local network. Firmware bugs and bad defaults have repeatedly left it listening on the internet facing side instead, which means anyone on the internet can create port mappings on your router.

The attack built on this, sometimes called UPnProxy, turns affected routers into relays for other people's traffic. Owners generally never notice. If your router exposes UPnP on the WAN, that is a genuine emergency rather than a debate about trade-offs, and it is worth checking directly.

Mappings that never go away

Mappings are supposed to carry a lease and expire. In practice, plenty of implementations create permanent ones, or fail to clean up after a program exits or crashes. Ports opened for a game you uninstalled two years ago can still be open, and the device behind them may now be running something entirely different.

Implementation bugs in the UPnP service itself

UPnP parses XML and SOAP from the network, and that code has a long history of buffer overflows and injection flaws across many vendors. A router whose firmware has not been updated in years is running a version of that code with known problems.

The risks that are overstated

A few claims come up constantly and deserve correcting, because they make the real risks harder to see.

"UPnP lets attackers on the internet into your network." Not by itself. A remote attacker cannot create a mapping unless UPnP is exposed on the WAN side, which is a specific fault rather than normal behaviour. The normal risk is internal: something already on your network abusing it.

"Disabling UPnP secures your network." It closes one path for a compromised device to expose itself. A compromised device does not need inbound ports to do damage: it can make outbound connections, which no consumer firewall blocks by default. Disabling UPnP is a reasonable hardening step, not a security strategy.

"UPnP is why my ports are open." Sometimes. Also possible: your ISP's remote management, a manual forwarding rule someone added years ago, or a DMZ host setting. Checking beats assuming, and the checks below take a few minutes.

Checking your own router

Four questions, all answerable without logging into anything.

  1. Is UPnP or NAT-PMP enabled at all?

    Run a UPnP and NAT-PMP discovery from a device on your network. It queries the gateway and reports whether either protocol answers. If neither does, the feature is off or unsupported and there is nothing to worry about here.

  2. What external address does the gateway report?

    The same discovery shows the external IP the gateway believes it has. Compare it against your actual public IP. If they differ, you are behind a second layer of NAT, which means UPnP mappings on this router do not reach the internet anyway.

  3. What is actually reachable from outside?

    This is the test that matters, because it measures the result rather than the configuration. External Port Check asks a server on the internet to connect back to a port on your public IP. Run it against the ports you care about: 22, 23, 80, 443, 445, 3389, 8080, and anything a device on your network might have opened. Anything that comes back open is genuinely exposed to the internet right now.

  4. Is UPnP itself reachable from outside?

    The UPnP service commonly listens on TCP 5000 or 49152, and SSDP uses UDP 1900. Check those from outside with the same tool. Any of them answering from the internet is a serious problem and a reason to update firmware or replace the router.

# What does the gateway say about itself?
https://netdebug.app/open/upnp

# Is anything answering on my public IP from the outside?
https://netdebug.app/open/reachme?port=5000
https://netdebug.app/open/reachme?port=3389

Check what the internet can actually reach

UPnP and NAT-PMP discovery asks your gateway what it supports and what external address it thinks it has. External Port Check then has a server on the internet connect back to your public IP, which is the only honest way to find out what is really exposed.

Download on the App Store

If you can log into the router, most firmware lists current UPnP mappings somewhere in the admin interface. Reading that list is often illuminating: entries for software nobody runs any more, or for a device that should have no business accepting inbound connections.

So should you turn it off?

Your situationRecommendation
No consoles, no peer to peer, nothing self hostedTurn it off. You are giving up a convenience you do not use.
Consoles and multiplayer games in daily useLeave it on, but isolate IoT devices and keep firmware current. The alternative is a long list of manual rules.
Lots of cheap smart home devicesTurn it off, or put those devices on a separate network where UPnP is disabled. They are the least trustworthy things you own.
Router firmware is more than two years oldTurn it off and update, or replace the router. Old UPnP implementations are where the known bugs live.
UPnP answers from the WAN sideTurn it off immediately and update the firmware. This is not a trade-off, it is a fault.
Behind CGNATIt barely matters. Inbound connections cannot reach you anyway.

If you turn it off and something breaks, you will usually know quickly: a game reports a strict or moderate NAT type, a voice call relays instead of connecting directly, a download runs slower. At that point you can add a manual forwarding rule for exactly that application, which is the outcome you actually wanted.

Better than a binary choice

The on or off framing hides the more useful options.

Segment the network. Put smart home devices on a separate network or VLAN with UPnP disabled there, and keep it enabled on the main one if you need it. This targets the actual risk, which is untrusted devices, rather than the mechanism.

Forward the handful of ports you really need. Manual rules are explicit, visible and permanent. For most households the list is short, and once it exists you can turn UPnP off without losing anything.

Audit what is exposed on a schedule. Run the external port check against your public IP once a month. Save it as an automation with the ports you care about and it becomes one tap, with results stored in Run History so you can see when something changed.

Keep firmware updated. Unglamorous and more effective than most configuration changes. Many of the worst UPnP problems were fixed years ago in versions that plenty of routers never received.

The short version

UPnP lets anything on your network open a port on your router without authentication. The realistic threat is not an attacker on the internet using it directly, it is an untrusted device on your own network, and that risk has grown as homes filled up with cheap hardware that stopped getting updates. Check whether it is enabled, compare the gateway's external address with your real public IP, and then verify from the outside what is genuinely reachable. If nothing you own needs it, turn it off. If something does, isolate the devices you trust least instead of arguing about the setting.

Frequently asked questions

Is UPnP a security risk?

It is a real but specific one. UPnP lets any device on your local network open a port on the router with no authentication, so a compromised device can expose itself to the internet without asking you. The risk scales with how much untrusted hardware is on your network.

Can attackers on the internet use UPnP to get into my network?

Not under normal conditions. UPnP is meant to listen only on the local side. The danger is when firmware bugs or bad defaults leave it listening on the internet facing interface, which has affected millions of routers and allows remote attackers to create port mappings.

Should I turn UPnP off?

Turn it off if you have no consoles, peer to peer applications or self hosted services, because you are giving up a convenience you never use. Leave it on if games and voice applications depend on it, but isolate cheap smart home devices and keep firmware current.

Will disabling UPnP break my games or console?

It can. You may see a strict or moderate NAT type, voice calls relaying instead of connecting directly, or slower peer to peer transfers. The fix is a manual forwarding rule for that specific application, which is more explicit and permanent than an automatic one.

How do I check whether UPnP is enabled on my router?

Run a UPnP and NAT-PMP discovery from a device on your network. It queries the gateway and reports whether either protocol answers, and when supported it also shows the external address the gateway believes it has.

How do I find out what ports are open on my router?

Use a service that connects back to your public IP from the internet, since testing from inside your own network is unreliable. Check the common ones such as 22, 80, 443, 445, 3389 and 8080, plus 1900, 5000 and 49152 to confirm UPnP itself is not reachable from outside.

Is NAT-PMP safer than UPnP?

It has the same trust model. NAT-PMP and PCP let devices on the local network request port mappings without authentication, exactly as UPnP does. The protocol is simpler and has had fewer parsing bugs, but the underlying risk is the same.