HIGH 8.8

CVE-2026-7838: UltraVNC Viewer Integer Overflow RCE – Urgent Patching Required

UltraVNC viewer versions through 1.8.2.2 contain a critical memory corruption flaw in how they parse error messages from VNC servers. When a malicious or compromised server sends a specially crafted error message during the initial connection phase, the viewer attempts to read far more data than it allocated, overwriting adjacent heap memory. An attacker can exploit this without any valid credentials, potentially executing arbitrary code on the user's machine. The vulnerability occurs before authentication succeeds, making it exploitable by hostile servers or network intermediaries.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-190, CWE-787
Affected products
1 configuration(s)
Published / Modified
2026-07-01 / 2026-07-09

NVD description (verbatim)

UltraVNC viewer through 1.8.2.2 contains an integer overflow leading to a heap buffer overflow in the RFB protocol failure-response parsing path. In vncviewer/ClientConnection.cpp, the 4-byte network-supplied reasonLen field (type CARD32) is passed as reasonLen+1 to CheckBufferSize(). Because both operands are unsigned 32-bit, a reasonLen of 0xFFFFFFFF overflows to 0, causing CheckBufferSize to allocate only 256 bytes. The subsequent ReadString(m_netbuf, reasonLen) call then performs ReadExact for the original 4 GiB length into that 256-byte heap buffer. This overflow is reachable via rfbConnFailed (auth-scheme negotiation) and rfbVncAuthFailed (post-handshake) message types without successful authentication. A malicious VNC server, or any man-in-the-middle on the RFB stream, can trigger this condition when the victim viewer connects, potentially resulting in remote code execution as the user running the viewer. The crash was confirmed with AddressSanitizer on a portable reproduction harness (heap-buffer-overflow WRITE at offset 256).

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from an integer overflow in UltraVNC's RFB protocol parsing. The viewer receives a 4-byte reasonLen field from the server and passes reasonLen+1 to CheckBufferSize(); when reasonLen is 0xFFFFFFFF (max CARD32), the addition overflows to 0, causing the allocator to reserve only 256 bytes. The subsequent ReadString call then attempts to read the original ~4 GiB worth of data into this undersized buffer via repeated ReadExact operations. This occurs in vncviewer/ClientConnection.cpp in two reachable code paths: rfbConnFailed (authentication scheme negotiation) and rfbVncAuthFailed (post-handshake failure), neither requiring prior authentication. The flaw has been confirmed to trigger heap-buffer-overflow writes at offset 256+ in controlled testing.

Business impact

Affected users connecting to remote systems via UltraVNC viewer face immediate remote code execution risk. In typical scenarios—system administrators, support staff, or remote IT personnel—compromise could grant attackers the privileges of the logged-in user. Organizations relying on UltraVNC for remote administration may lose confidentiality, integrity, and availability of both the viewer host and, potentially, downstream systems accessed through that compromised session. The pre-authentication nature of the flaw means no valid credentials are needed; network positioning suffices.

Affected systems

UltraVNC viewer through version 1.8.2.2 is affected. The vulnerability resides in the client-side viewer application; UltraVNC servers are not directly vulnerable through this flaw. Any deployment using the affected viewer—whether on Windows, portable instances, or integrated into third-party remote-support tools—should be considered at risk. Users must verify their installed viewer version and confirm availability of patches from UVNC (verify against the vendor advisory for patch version details).

Exploitability

Exploitability is high. No user interaction beyond initiating a connection is required; the overflow triggers automatically during server response parsing. A malicious VNC server, or any network position permitting RFB stream manipulation (ARP spoofing, DNS hijacking, compromised network infrastructure), can trigger the condition. The attack surface is broad: any viewer user connecting to an untrusted or compromised server is at risk. Proof-of-concept conditions have been demonstrated using controlled test environments, confirming reliable triggering and heap corruption.

Remediation

Immediately update UltraVNC viewer to a patched version released by the UVNC project (consult vendor advisory for exact version number and release date). Until patching is possible, isolate viewer usage to trusted, verified VNC servers over authenticated, encrypted channels. Consider disabling or restricting remote desktop access via UltraVNC until patches are deployed. For organizations, prioritize testing and rollout of patched binaries to all affected users, particularly those with administrative access or access to sensitive systems.

Patch guidance

Monitor the UVNC project's official releases for version 1.8.2.3 or later (verify against vendor advisory). Apply patches systematically across your environment, prioritizing critical infrastructure and administrative workstations. Test in a staging environment before broad rollout to confirm compatibility with your RFB server infrastructure. Portable and installer versions should both be updated. Some organizations may distribute patched binaries internally; verify chain of custody. Older or abandoned instances of UltraVNC (e.g., bundled in legacy tools) should be inventoried and updated or replaced.

Detection guidance

Monitor for unusual network traffic to/from systems running UltraVNC viewer, particularly connections to unexpected VNC servers. Alert on failed RFB connection attempts with abnormally large error message fields. Endpoint Detection and Response (EDR) tools should flag heap corruption events or crash dumps from vncviewer.exe processes. Network-level IDS signatures targeting oversized RFB reasonLen fields may catch some attack attempts. However, post-compromise forensics (memory dumps, process execution logs) are more reliable for confirming exploitation. Assume any system that experienced an unplanned vncviewer crash during this period may have been targeted.

Why prioritize this

This is a high-severity, pre-authentication remote code execution vulnerability affecting a widely-used remote administration tool. The CVSS 8.8 rating reflects the combination of network accessibility, low complexity, lack of privilege requirement, and full confidentiality/integrity/availability impact. Organizations must treat this as urgent: attackers can compromise viewer hosts without valid credentials or user interaction beyond a connection attempt. Rapid patching is critical to prevent mass compromise of administrative users and downstream lateral movement.

Risk score, explained

CVSS 3.1 score of 8.8 (HIGH) is driven by: (1) Network vector—exploitation requires only network connectivity, no physical access; (2) Low attack complexity—triggering the overflow is straightforward via malformed RFB messages; (3) No privileges required—pre-authentication reachability; (4) User interaction required (UI:R)—user must initiate a viewer connection, but no additional interaction is needed once connected; (5) Unchanged scope—impact is confined to the user's system; (6) High CIA impact—successful exploitation enables arbitrary code execution with viewer process privileges. The absence from CISA KEV at publication indicates active exploitation has not yet been formally tracked, but this should not reduce urgency; pre-auth RCE vulnerabilities are historically attractive to attackers.

Frequently asked questions

If I'm not currently using UltraVNC viewer, am I affected?

No. This vulnerability is specific to the UltraVNC viewer (client) application. If you use other remote desktop tools (e.g., RDP, TeamViewer, AnyDesk) or run only a VNC server without the viewer, you are not affected by CVE-2026-7838. However, verify your inventory carefully, as UltraVNC may be bundled in legacy or third-party remote-support software.

Can my VNC server be compromised if I'm running an older UltraVNC server version?

No. The vulnerability is in the viewer's RFB protocol parsing logic. UltraVNC server components are not vulnerable through this flaw. However, if a server is compromised for other reasons, an attacker could leverage it to attack connecting viewers.

Do I need valid VNC credentials to exploit this?

No. The vulnerable code paths (rfbConnFailed and rfbVncAuthFailed) are reachable before authentication succeeds. A malicious server can trigger the overflow as soon as the viewer connects, without any valid password or authentication token. This makes the attack surface significantly broader than post-authentication flaws.

What should I do if my organization uses UltraVNC but doesn't yet have patches available?

Prioritize quarantining UltraVNC viewer to trusted, verified servers over authenticated channels (e.g., VPN-gated access, mutual TLS). Restrict viewer usage to essential administrative users and audit all connections. Monitor for crashes or unusual behavior in vncviewer processes. Contact UVNC or your software vendor for patch status and expected release timeline. Consider temporary use of alternative remote administration tools if available.

This analysis is provided for educational and defensive security purposes. SEC.co makes no warranty regarding the completeness or accuracy of this information. Consult official vendor advisories, security bulletins, and your own risk assessment before making patching or deployment decisions. Exploit development, distribution, or use of this vulnerability for unauthorized purposes is illegal. Organizations should validate patch compatibility in controlled environments before production rollout. CVE details, CVSS scores, and KEV status are based on data current as of publication; verify against authoritative sources (NVD, vendor advisories) for updates. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).