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
From one request
to root shell.
Reproduced in a sandboxed environment. Requires only LAN or WiFi adjacency.
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.
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.
When does this fire?
All conditions must be true for the exploit to succeed.
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.
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.
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.
disclose@securin.ioVendors moved in days.
Attackers in hours.
Reconstructed from vendor advisories, CISA bulletins, and Securin research records.
Timeline recorded · Disclosure coordinated by Securin
Cite, verify, go deeper.
Primary sources — NVD, CISA KEV, and machine-readable IoC feed.