FreshScanSentry Free vulnerability scanning for your network & web apps Run a free scan

High risk Port 5900 · VNC remote desktop

VNC port 5900 is open: what it means and how to fix it

Short answer: port 5900 is VNC, a way to see and control a computer's screen from somewhere else. Open to the internet, it lets anyone try to take over that screen. Some VNC servers ask for no password at all, and classic VNC passwords can only be 8 characters long.

The fix: close port 5900 to the internet. For remote access, connect through a VPN or SSH tunnel, or use a remote-access service that doesn't need an open port.

What is port 5900?

VNC (Virtual Network Computing) shares a computer's desktop over the network, so you can see the screen and use its keyboard and mouse remotely. It works on Windows, Mac, Linux and Raspberry Pi, and it's built into many other devices. Port 5900 is the first VNC screen. A second screen on the same machine uses 5901, a third 5902, and so on.

Where it usually comes from:

Why an open port 5900 is high risk

How it looks in your report your-office-ip
  1. 5900 VNC Often unauthenticated or weakly authenticated remote desktop High
Any High finding caps your exposure grade at D

How to confirm it, and whether it has a password

  1. Check from outside your network. A free FreshScanSentry Basic Scan of your public IP address shows whether port 5900 answers.
  2. Or use Nmap from another connection, such as a phone hotspot, and include the next few VNC ports:
    nmap -p 5900-5910 -sV --script vnc-info your-public-ip
    vnc-info lists the security types the server accepts. If it shows None, anyone can connect without a password. Treat that as an emergency and close the port now.
  3. Find the computer. In your router, look for a port forward for 5900 (or 5800, VNC's old web viewer) and note the inside IP address it points to, or check whether a device is in the DMZ.

Only scan addresses you own or have written permission to test.

How to fix it

1. Close the port to the internet

2. Give remote users a safer way in

3. Lock down the VNC server

4. If you don't use it, turn it off

5. Re-scan to confirm

Run another external scan. Port 5900 should no longer appear, and your exposure grade should go up.

If you think someone already got in

Signs include the mouse moving on its own, programs opening by themselves, new software you didn't install, or changed settings and passwords. Disconnect the computer from the network, change passwords from a different, clean device, and have the machine checked by an IT professional before reconnecting it.

Common questions

Is VNC the same as Windows Remote Desktop?

They do the same job, but they're different protocols. Windows Remote Desktop uses port 3389 and has its own guide: Port 3389 (RDP) open. The advice is the same, though: keep remote desktop off the open internet.

We set a strong VNC password. Is that enough?

It helps, but classic VNC only uses the first 8 characters, and a password doesn't protect against flaws in the VNC software itself. A VPN or tunnel removes the exposure entirely.

An installer set this up for remote support.

Ask them to switch to a VPN or a remote-support tool with multi-factor login. Most can do this, and it protects them as well as you.

Sources: RFC 6143 (the VNC protocol) · Kaspersky: 37 vulnerabilities in open-source VNC systems · Nmap vnc-info · Apple: turn Screen Sharing on or off