Skip to content
AdminKit

Is port 5900 (VNC) exposed to the internet, and how strong is its password really?

Port 5900 is the default port for VNC, a remote-desktop protocol. Like RDP, it's named in U.S. cybersecurity advisories as a common ransomware entry point, and VNC's classic authentication caps the password at 8 characters, making an exposed server easy to brute-force. 5900 isn't on AdminKit's port-check tool's nine-port list, so this guide explains how to check your exposure manually.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • Port 5900 is the only port IANA assigned to VNC’s Remote Framebuffer (RFB) protocol; extra desktops on the same host usually listen on 5901, 5902 and up.
  • RFB on its own encrypts nothing. Its classic “VNC Authentication” cuts the password to 8 characters and uses it as a DES key, and RFC 6143 calls it cryptographically weak.
  • A VNC server set to the “None” security type hands its desktop to anyone who connects. That is worse than a weak password.
  • The fix is reachability, not a stronger password: keep 5900 off the internet and reach VNC through a VPN, an SSH tunnel or a zero-trust access service.

Why is VNC’s password security weaker than it looks?

VNC is built on RFB, the Remote Framebuffer Protocol (RFC 6143) (also on the IETF Datatracker), and its original “VNC Authentication” security type truncates the user’s password to 8 characters (padding shorter ones with nulls) and uses it as a DES encryption key for a challenge-response exchange. The RFC itself says plainly that “this type of authentication is known to be cryptographically weak and is not intended for use on untrusted networks” — exactly the situation a VNC server forwarded directly to the internet is in. Many VNC server implementations still default to this scheme or offer it as an option.

The challenge-response itself is short. The server sends a random 16-byte challenge, the client encrypts it with DES using the (truncated) password as the key, and sends the 16-byte result back. Nothing else in the session is protected: section 9 of RFC 6143 states that the protocol “provides no security beyond the optional and cryptographically weak password check” and “no protection against observation of or tampering with the data stream.” Every keystroke, every screen update and every clipboard transfer on a classic RFB session crosses the network in the clear.

Which VNC security types will you find on port 5900?

During the handshake the server offers a list of security types, and the client picks one. The numbers come from the IANA Remote Framebuffer Security Types registry, which RFC 6143 set up. The ones you are most likely to see on a home or small-office server are:

TypeName (IANA registry)What it means for an exposed port 5900
1NoneNo password at all. Anyone who reaches the port gets the desktop.
2VNC AuthenticationDES challenge-response with a password cut to 8 characters; the session itself is not encrypted.
18TLSHistoric assignment for a TLS-wrapped session; support depends on the server and viewer.
19VeNCryptHistoric assignment for an extension that adds TLS and stronger login options, used by several open-source servers.
23, 24Secure Tunnel, Integrated SSHRegistered with RFC 7869 as the reference; check whether your own server and viewer support them.

Two practical points follow from that table. First, the type a server offers matters more than the type your own viewer happens to pick: if type 1 or type 2 is on the list, an attacker can choose it. Second, type 1 is not a theoretical setting. “No password” is a checkbox in many VNC servers, often ticked during a quick setup on a trusted LAN and then forgotten when someone later adds a port forward.

Why does this matter for ransomware risk specifically?

The same joint CISA & FBI advisory (AA22-137A) that names RDP a top initial-access vector for ransomware covers remote-access services generally, and VNC shares the core problem: once port 5900 is reachable from the internet, an attacker can run automated credential attacks against it, and if VNC Authentication’s 8-character/DES limitation is in play, those attacks have an easier target than a modern authentication scheme would present.

A remote desktop is also the most useful foothold an attacker can get. It runs as a logged-in user, it sees whatever that user sees, and it can launch any program the user can. MITRE ATT&CK catalogues this as Remote Services: VNC (T1021.005), noting that adversaries may abuse VNC to act as the logged-on user, for example opening documents, downloading files and running arbitrary commands. On a small office network, the machine running a VNC server is often the one that also holds file shares, accounting software or the admin console for other devices. The attack does not need an exploit; a guessed or missing password is enough.

How does port 5900 end up open in the first place?

Most exposed VNC servers were not put on the internet on purpose. The usual paths are:

  1. A manual port forward for remote support. Someone needed to reach a machine from home once, forwarded 5900 on the router, and never removed the rule.
  2. UPnP on the router. Some remote-access software asks the router to open a port automatically. If UPnP is enabled, the forward appears without anyone editing the router’s rules by hand.
  3. A host with a public address. A VPS, a lab machine on a public subnet, or an IPv6 address with no inbound filtering is reachable without any forward at all.
  4. Several desktops on one host. A server that runs display :1 or :2 listens on 5901 or 5902. RFC 6143 notes that “server N typically listens on port 5900+N”, so checking only 5900 can miss them. Some older servers also run a small web server on port 5800 to serve a browser viewer.

How do you check your own exposure?

AdminKit’s open ports check checks a fixed nine-port list, and port 5900 isn’t on it. Confirm your current public IP with what is my IP first, then test the port manually from a machine outside your network with nc -vz -w 3 203.0.113.5 5900.

An RFB server speaks first: as soon as the TCP connection opens, it sends a 12-byte version string. That makes the result easy to read. From a phone hotspot or another outside connection, replace the documentation address below with your own public IP:

$ nc -v -w 3 203.0.113.5 5900
Connection to 203.0.113.5 5900 port [tcp/*] succeeded!
RFB 003.008
What you seeWhat it meansWhat to do next
succeeded followed by RFB 003.00xA VNC server is reachable from the internet on this port.Treat it as exposed now. Remove the forward or block the port, then follow the fixes below.
succeeded with no banner, or a different bannerSomething answers on 5900, but it may not be VNC.Find which device and service the forward points to before assuming it is safe.
timed out or refusedNothing reachable answered on this port from where you tested.Repeat for 5901-5903 and 5800 if any machine runs extra displays, and re-test after router changes.

Test from outside your own network. A test from inside the LAN reaches the server directly and says nothing about what the internet sees. Also check the router’s UPnP mapping table, if it shows one, for entries you did not create.

How do you fix an exposed VNC server?

  • Don’t forward port 5900 to the internet directly — put VNC access behind a VPN or zero-trust tunnel, the same recommendation as for RDP.
  • If your VNC server supports it, use a stronger authentication scheme than classic VNC Authentication; several modern VNC implementations support TLS-based or SSH-tunneled connections instead.
  • Use a long, unique password regardless — the 8-character DES limitation is a reason to add a tunnel, not a reason a weaker password is “good enough” without one.
  • Remove security type 1 (“None”) from the server’s settings, and turn off UPnP on the router if nothing on the network needs it.

The simplest tunnel for one admin is SSH, which RFC 6143 itself names as a secure channel for RFB sessions. Many VNC servers can listen on the loopback interface only (TigerVNC and x11vnc, for example, have a -localhost option), so the port is closed to the network entirely. From your laptop you then forward a local port through SSH and point the viewer at it:

# On the VNC host: listen on loopback only (option name varies by server)
# On your laptop:
ssh -L 5901:localhost:5900 admin@vnc-host.example.net
# then open the VNC viewer on localhost:5901

The SSH login now does the authentication, with keys instead of an 8-character password, and the whole RFB stream is encrypted inside the tunnel. For a team, the same idea scales up as a VPN or a zero-trust access service that checks who the user is before any packet reaches the VNC port.

OptionWho it suitsWhat it changes for port 5900
SSH tunnel to a loopback-only serverOne or two admins who already use SSHPort 5900 is closed to the network; access needs an SSH key.
VPN into the office networkSmall teams reaching several machinesPort 5900 is only reachable for users already on the VPN.
Zero-trust access serviceTeams that want per-user, per-device checksEach session is authorised before it reaches the server; no inbound forward.
Strong password and TLS-capable security type onlyA stop-gap while you set up one of the aboveThe port stays exposed; the login is harder to guess and the stream is encrypted.

See RDP and VNC exposed to the internet for the shared zero-trust alternative and more on why both protocols end up targeted the same way.

Which devices may you test with these checks?

Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.

VNC’s remote-framebuffer protocol is one entry in AdminKit’s broader machine protocols cluster, which rounds up the remote-access and device-management protocols most often found reachable from the open internet.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

Does AdminKit's port-check tool scan port 5900?

No. The tool checks a fixed list of nine specific TCP ports (23, 554, 1883, 8883, 502, 7547, 80, 443, 8080) chosen for how often they turn up misconfigured on home and small-office devices — see the port-check tool page for the current list. 5900 isn't on that list, so confirm your own exposure with the manual check below.

Is VNC's classic password authentication actually that weak?

Per RFC 6143 itself, yes — the password is truncated to 8 characters and used as a DES encryption key, and the RFC states this authentication type "is known to be cryptographically weak and is not intended for use on untrusted networks."

Is VNC named in the same ransomware advisories as RDP?

The joint CISA & FBI advisory AA22-137A on initial-access techniques covers remote-access services broadly, and VNC shares RDP's core exposure problem: a reachable login prompt that's attractive to automated credential attacks.

Do all VNC servers use the weak 8-character scheme?

No — many modern VNC implementations support stronger options like TLS-based connections or SSH tunneling. The point is to check what your specific server is actually configured to use, not assume.

What's the single most effective fix?

Don't forward port 5900 to the internet directly — put VNC access behind a VPN or zero-trust tunnel, the same recommendation as for RDP, regardless of which authentication scheme the server supports.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.