SecurinZero Days
    Email Us
    Zero-Day Research/CVE-2026-7831
    ▲ HighCVSS 7.5✓ Patched

    Off-by-One Stack Write in Viewer ReadString nameLength (UltraVNC)

    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.

    CVE IDCVE-2026-7831
    CVSS v3.17.5 High
    VendorUltraVNC
    CWECWE-193: Off-by-one Error, CWE-787: Out-of-bounds Write
    DisclosedJun 3, 2026
    StatusFixed
    All advisories
    • 01Description
    • 02Proof of Concept
    • 03Vulnerable Code
    • 04Trigger Conditions
    • 05Impact
    • 06Remediation
    • 07Timeline
    • 08References
    01/Description

    What this actually is.

    Technical background, root cause, and affected surface.

    In vncviewer/ClientConnection.cpp, when server-supplied nameLength equals 2024 the 2024-byte stack buffer _dn[2024] is exactly filled by ReadString. ReadString then writes NUL at buf[length] = _dn[2024], one byte past the buffer. On MSVC /GS builds the corrupted stack canary causes process termination. ASan confirms stack-buffer-overflow at offset 4216.

    Vendor
    UltraVNC
    Product
    UltraVNC Viewer
    Severity
    High
    CVSS Score
    7.5
    Status
    Fixed
    Vector
    CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
    CWE
    CWE-193: Off-by-one Error, CWE-787: Out-of-bounds Write
    02/Proof of Concept

    From one request
    to root shell.

    Reproduced in a sandboxed environment. Requires only LAN or WiFi adjacency.

    7.5CVSS 3.1
    VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
    ScopeUnchanged
    ImpactC:L / I:L / A:H
    SeverityHigh

    Malicious RFB server sets nameLength=2024 in ServerInit. ASan: stack-buffer-overflow at offset 4216 (_dn base+2024). /GS canary: process terminates with security check failure. Crash-trigger only.

    03/Vulnerable Code

    The bug, and the fix.

    char _dn[2024]={0}; ReadString(_dn, m_si.nameLength); // reads 2024 bytes // Inside ReadString (ClientConnection.cpp:6954): buf[length] = '\0'; // writes _dn[2024] — 1 byte OOB

    Root cause: ReadString writes buf[length]='\0' unconditionally. Caller declares char _dn[2024] and passes length=2024. Exact-2024 case is not clamped before calling ReadString.

    04/Trigger Conditions

    When does this fire?

    All conditions must be true for the exploit to succeed.

    01

    Victim viewer connects to malicious VNC server. 2. RFB handshake and authentication complete. 3. Server sends ServerInit with nameLength=2024 (exactly). 4. Viewer: ReadString(_dn, 2024) → NUL written at _dn[2024] — 1 byte OOB.

    Required
    05/Impact

    What an attacker does to you.

    Post-exploitation outcomes mapped to CVSS impact metrics.

    Reliable crash of vncviewer.exe via /GS canary on MSVC Release builds (DoS). On builds without stack canaries, 1-byte stack overwrite may allow partial control-flow manipulation.

    06/Remediation

    Fix it. In this order.

    A runbook, not a checklist. Sequence matters — assume compromise before you act.

    Pass min(nameLength, sizeof(_dn)-1) to ReadString. Vendor fix: stack buffer enlarged to char _dn[2025] so _dn[2024] is a valid index.

    Securin advisory — For coordinated remediation support or threat-actor briefings related to CVE-2026-7831, contact disclose@securin.io
    07/Disclosure Timeline

    Vendors moved in days.
    Attackers in hours.

    Reconstructed from vendor advisories, CISA bulletins, and Securin research records.

    2026-06-02: Discovered and ASan crash-confirmed; 2026-06-17: Reported to vendor; 2026-06-17: Fix validated; 2026-09-03: Planned public disclosure

    Timeline recorded · Disclosure coordinated by Securin

    08/References

    Cite, verify, go deeper.

    Primary sources — NVD, CISA KEV, and machine-readable IoC feed.

    NVD

    NVD — CVE-2026-7831

    nvd.nist.gov/vuln/detail/CVE-2026-7831 →
    SEC

    Securin VI — Full Technical Analysis

    vi.securin.io →
    REF

    CVE-2026-7831; vncviewer/ClientConnection.cpp:3799,6950-6954; phase3_deep_analysis.md FINDING-011

    Let Securin level up your security posture.

    Get a live exposure assessment, threat-actor briefing tailored to your sector, and IoC mapping for your SIEM.

    Browse all advisories
    SecurinSecurinZero Days

    Securin's zero-day research operation combines frontier AI models with a decade of offensive expertise — discovering, validating, and coordinating the disclosure of high-impact vulnerabilities at a scale and speed no human team achieves alone.

    Glossary
    © 2026 Securin Inc · CVE Numbering Authority
    Privacy Policy·Data Processing Addendum