CVE-2026-7831: UltraVNC viewer off-by-one stack overflow in ServerInit desktop name parsing

Published Jul 1, 2026
·
Updated

UltraVNC viewer through 1.8.2.2 contains an off-by-one stack buffer overflow in the RFB ServerInit message handler. In vncviewer/ClientConnection.cpp, when the server-supplied nameLength equals exactly 2024 the code declares a 2024-byte stack buffer dn[2024] and calls ReadString(dn, 2024). ReadString writes the NUL terminator at buf[length], i.e., dn[2024], one byte past the end of the stack buffer. A malicious VNC server can trigger this condition by advertising a desktop name of length 2024 in its ServerInit message. On release builds without stack canaries the single-byte NUL overwrite adjacent stack data. On builds with /GS stack protection the canary is corrupted and the process terminates, resulting in denial of service. User interaction (connecting the viewer to the malicious server) is required.

Affected Software

2 affected components
UltraVNC viewer<=1.8.2.2
Uvnc Ultravnc<=1.8.2.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade UltraVNC viewer to a version that resolves this vulnerability.

    Fixed in 1.8.2.2Patch UltraVNC viewer through 1.8.2.2 contains an off-by-one stack buffer overflow in the RFB ServerInit message handler.
  2. Compensating control

    Prevent/limit connections to untrusted VNC servers (user must connect viewer to the malicious server), e.g., restrict which hosts/servers UltraVNC viewer can connect to via network ACL/firewall.

Event History

Jul 1, 2026
CVE Published
via MITRE·03:33 AM
Data Sourced
via MITRE·03:33 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-7831?

The severity of CVE-2026-7831 is classified as high with a score of 7.6.

2

What is CVE-2026-7831?

CVE-2026-7831 is a vulnerability in UltraVNC viewer that involves an off-by-one stack overflow in the ServerInit desktop name parsing.

3

How do I fix CVE-2026-7831?

To fix CVE-2026-7831, you should update to the latest version of UltraVNC that addresses this vulnerability.

4

What are the potential impacts of CVE-2026-7831?

Exploitation of CVE-2026-7831 could lead to a stack overflow, which may allow an attacker to execute arbitrary code.

5

Which versions of UltraVNC are affected by CVE-2026-7831?

UltraVNC viewer versions up to and including 1.8.2.2 are affected by CVE-2026-7831.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203