What this actually is.
Technical background, root cause, and affected surface.
In rfb/dh.cpp:204, vncWc2Mb() calls wcslen(widechar) before applying any bounds check. If a caller supplies a wide-character buffer without a NUL terminator, wcslen reads beyond the buffer until it encounters a NUL or crosses a page boundary, potentially causing a crash or adjacent memory disclosure.
- Vendor
- UltraVNC
- Product
- UltraVNC
- Severity
- Medium
- CVSS Score
- 4.3
- Status
- Fixed
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
- CWE
- CWE-125: Out-of-bounds Read
From one request
to root shell.
Reproduced in a sandboxed environment. Requires only LAN or WiFi adjacency.
No PoC — requires abnormal caller contract (non-NUL-terminated wide string).
The bug, and the fix.
int origlen = wcslen(widechar); // dh.cpp:204 — OOB read if not NUL-terminated if (origlen > length) origlen = length; // dh.cpp:205 — bounds check after the read
Root cause: wcslen() called before bounds validation. Caller-provided length not used as upper bound for the length scan.
When does this fire?
All conditions must be true for the exploit to succeed.
Caller passes a WCHAR* buffer without a NUL terminator to vncWc2Mb(). Under normal Win32 API usage this requires an explicit violation of the calling convention.
What an attacker does to you.
Post-exploitation outcomes mapped to CVSS impact metrics.
OOB read past end of wide string buffer. May cause process crash if read crosses unmapped page, or expose adjacent heap/stack data.
Fix it. In this order.
A runbook, not a checklist. Sequence matters — assume compromise before you act.
Replace wcslen(widechar) with wcsnlen(widechar, length) using the caller-supplied length as scan maximum. Vendor fix applied: wcsnlen with explicit bound.
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.