# CVE-2026-7838: UltraVNC viewer heap buffer overflow via integer overflow in RFB connection-failure reason length

- Severity: High 8.7 (CVSS:4.0, scored by securin) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.40%, higher than 73% of CVEs (2026-12-01)
- Published: 2026-07-01T03:33:26.501Z
- Modified: 2026-10-25T17:10:00.197Z
- Weaknesses: CWE-190, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: securin

## 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).

(As written by CVE List.)

## Affected

- uvnc UltraVNC: up to 1.8.2.2

## Every score

- securin: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- securin: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://uvnc.com/> (product, release-notes, vendor-advisory)
- <https://github.com/ultravnc/UltraVNC> (product)
- <https://www.securin.io/zero-days/cve-2026-7838-heap-overflow-viewer-reasonlen-integer-overflow-ultravnc>

## Sources

- CVE List: [CVE-2026-7838](https://www.cve.org/CVERecord?id=CVE-2026-7838), CVE Terms of Use, modified 2026-07-09
- NVD: [CVE-2026-7838](https://nvd.nist.gov/vuln/detail/CVE-2026-7838), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-7838 · Whole record: https://cve.day/CVE-2026-7838.json · Rebuilt by cve.day 2026-11-25T22:59:26.874Z
