CVE-2026-7838 UltraVNC viewer heap buffer overflow via integer overflow in RFB connection-failure reason length

High 8.7 Published Updated

A malicious VNC server can trigger a heap buffer overflow in UltraVNC viewer via integer overflow, potentially allowing remote code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-7838?

CVE-2026-7838 is a high-severity vulnerability in uvnc UltraVNC, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-787, CWE-190

Which versions are affected by CVE-2026-7838?

It affects 1 product.

Products include Uvnc Ultravnc.

How do I fix CVE-2026-7838?

No fix has been published for CVE-2026-7838 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-7838 being exploited?

There is no known exploitation of CVE-2026-7838 in the wild and no public exploit code.

Sources

Also known as GHSA-wxqv-4fpj-f62j.

Is CVE-2026-7838 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free