CVE Catalog

CVE-2026-7838

HighCVSS 8.8
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Elevated risk
1.40%

69th percentile - higher than 69% of all known CVEs

Summary

In UltraVNC viewer up to version 1.8.2.2, an integer overflow leads to a heap buffer overflow in the RFB protocol failure-response parsing path. The 4-byte reasonLen field (CARD32) is passed as reasonLen+1 to CheckBufferSize(), and when set to 0xFFFFFFFF it overflows to 0, causing allocation of only 256 bytes. The subsequent ReadString() then reads the original 4 GiB into that small buffer, causing overflow.

Risk Assessment

A remote unauthenticated attacker (malicious VNC server or man-in-the-middle) can exploit this vulnerability to achieve remote code execution on the victim's machine, gaining full control. The attack requires no authentication and is triggered when the victim connects to a malicious server.

Recommendation

Immediately update UltraVNC viewer to a version newer than 1.8.2.2 once a patch is released. Until then, avoid connecting to untrusted VNC servers and use tunneling (e.g., SSH) to protect against MITM attacks.

Other vulnerabilities in UltraVNC

See all
Original NVD description (English source)

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).

Vulnerability data from NVD (NIST) · CISA KEV · EPSS