Home

Description

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

PUBLISHED Reserved 2026-05-05 | Published 2026-07-01 | Updated 2026-07-09 | Assigner securin




HIGH: 8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
HIGH: 8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Problem types

Integer Overflow or Wraparound

Out-of-bounds Write

Product status

Default status
unaffected

Any version
affected

Timeline

2026-06-02:Vulnerability discovered and crash-confirmed with AddressSanitizer
2026-06-17:Reported to vendor (coordinated disclosure)
2026-09-15:Planned public disclosure (90-day window)

Credits

Arjun Basnet, Securin (arjun.basnet@securin.io) finder

References

uvnc.com/ (UltraVNC project page) vendor-advisory

github.com/ultravnc/UltraVNC (UltraVNC source repository) product

www.securin.io/...viewer-reasonlen-integer-overflow-ultravnc

cve.org (CVE-2026-7838)

nvd.nist.gov (CVE-2026-7838)

Download JSON