CVE-2026-7838: Integer Overflow or Wraparound in uvnc UltraVNC
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).
AI Analysis
Technical Summary
CVE-2026-7838 is an integer overflow vulnerability in UltraVNC viewer (up to version 1.8.2.2) within the RFB protocol failure-response parsing path. Specifically, the 4-byte network-supplied reasonLen field (CARD32) is used in a calculation that overflows when reasonLen is 0xFFFFFFFF, leading to an under-allocated buffer of 256 bytes. Subsequent reading of reasonLen bytes into this buffer causes a heap buffer overflow. This vulnerability can be triggered by a malicious VNC server or a man-in-the-middle during authentication failure messages (rfbConnFailed and rfbVncAuthFailed), potentially resulting in remote code execution with the privileges of the user running the viewer. The issue was confirmed with AddressSanitizer on a test harness.
Potential Impact
A remote attacker controlling a VNC server or positioned as a man-in-the-middle can exploit this vulnerability to cause a heap buffer overflow in the UltraVNC viewer, potentially leading to remote code execution under the context of the user running the viewer. This can compromise the victim system without requiring prior authentication.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid connecting to untrusted VNC servers and consider network-level protections to prevent man-in-the-middle attacks. Monitor vendor channels for updates and apply patches promptly once released.
CVE-2026-7838: Integer Overflow or Wraparound in uvnc UltraVNC
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).
CVSS v4.0
Score 8.7high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-7838 is an integer overflow vulnerability in UltraVNC viewer (up to version 1.8.2.2) within the RFB protocol failure-response parsing path. Specifically, the 4-byte network-supplied reasonLen field (CARD32) is used in a calculation that overflows when reasonLen is 0xFFFFFFFF, leading to an under-allocated buffer of 256 bytes. Subsequent reading of reasonLen bytes into this buffer causes a heap buffer overflow. This vulnerability can be triggered by a malicious VNC server or a man-in-the-middle during authentication failure messages (rfbConnFailed and rfbVncAuthFailed), potentially resulting in remote code execution with the privileges of the user running the viewer. The issue was confirmed with AddressSanitizer on a test harness.
Potential Impact
A remote attacker controlling a VNC server or positioned as a man-in-the-middle can exploit this vulnerability to cause a heap buffer overflow in the UltraVNC viewer, potentially leading to remote code execution under the context of the user running the viewer. This can compromise the victim system without requiring prior authentication.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid connecting to untrusted VNC servers and consider network-level protections to prevent man-in-the-middle attacks. Monitor vendor channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- securin
- Date Reserved
- 2026-05-05T07:30:55.831Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a44a07a27e9c79719fbd742
Added to database: 07/01/2026, 05:07:06 UTC
Last enriched: 07/08/2026, 12:54:49 UTC
Last updated: 08/10/2026, 12:41:12 UTC
Views: 141
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.