Description
UltraVNC through 1.8.2.2 uses a cryptographically weak pseudo-random number generator to produce VNC authentication challenge bytes. In rfb/vncauth.c:119-129, the vncRandomBytes() function seeds libc rand() with time(0) + getpid() + rand() and generates a 16-byte challenge. The combined seed space is approximately 31 bits (libc rand() internal state) and is entirely determined by publicly-observable values (wall-clock time and process ID). An attacker who can observe the authentication exchange can enumerate the seed space and predict the challenge within seconds, enabling forgery or offline brute-forcing of responses. Note: on Windows, the active code path may use vncEncryptBytes2.cpp which calls CryptGenRandom; reachability on shipped Windows binaries requires compile-graph verification and is under investigation.
Published: 2026-07-01
Score: 4.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

UltraVNC versions up to 1.8.2.2 generate VNC authentication challenges with a weak pseudo‑random number generator seeded from the current time, the process ID, and an additional rand() call. The combined seed size is only about 31 bits and is derived from publicly visible data. Consequently an attacker who can observe a VNC authentication exchange can enumerate the limited seed space and predict the 16‑byte challenge within seconds. This enables forgery of the authentication response or rapid offline brute‑force attempts, allowing unauthorized remote desktop control.

Affected Systems

The vulnerability affects UltraVNC releases through version 1.8.2.2. The affected component is the vncauth.c module that produces the authentication challenge. While the Windows binaries may use CryptGenRandom in a different code path, the reachability of this path in distributed binaries is under investigation, so the primary impact is for the standard Unix/Linux builds of UltraVNC.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity. Because the attacker requires only a captured authentication conversation and the seed space is small, the practical exploitation risk is higher than the CVSS might suggest, although no EPSS data is available. The vulnerability is not listed in the CISA KEV catalog, so no documented exploit is known yet, but the nature of the weakness means an attacker can generate correct credentials with minimal effort once the challenge is observed.

Generated by OpenCVE AI on July 1, 2026 at 13:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade UltraVNC to a version released after 1.8.2.2 that replaces the weak PRNG with a secure random generator.
  • If upgrading is not immediately possible, restrict VNC access to trusted IP ranges or require additional network layer security such as a VPN or SSH tunnel.
  • Disable or reconfigure non‑secure authentication mechanisms on the VNC server to require stronger cryptographic protocols.

Generated by OpenCVE AI on July 1, 2026 at 13:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 09 Jul 2026 05:30:00 +0000


Wed, 01 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 13:45:00 +0000

Type Values Removed Values Added
First Time appeared Uvnc
Uvnc ultravnc
Vendors & Products Uvnc
Uvnc ultravnc

Wed, 01 Jul 2026 05:00:00 +0000

Type Values Removed Values Added
Description UltraVNC through 1.8.2.2 uses a cryptographically weak pseudo-random number generator to produce VNC authentication challenge bytes. In rfb/vncauth.c:119-129, the vncRandomBytes() function seeds libc rand() with time(0) + getpid() + rand() and generates a 16-byte challenge. The combined seed space is approximately 31 bits (libc rand() internal state) and is entirely determined by publicly-observable values (wall-clock time and process ID). An attacker who can observe the authentication exchange can enumerate the seed space and predict the challenge within seconds, enabling forgery or offline brute-forcing of responses. Note: on Windows, the active code path may use vncEncryptBytes2.cpp which calls CryptGenRandom; reachability on shipped Windows binaries requires compile-graph verification and is under investigation.
Title UltraVNC vncauth.c uses time-seeded libc rand() to generate VNC authentication challenge bytes
Weaknesses CWE-338
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: securin

Published:

Updated: 2026-07-09T04:36:05.643Z

Reserved: 2026-05-05T03:40:37.003Z

Link: CVE-2026-44040

cve-icon Vulnrichment

Updated: 2026-07-01T12:45:00.742Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-01T13:30:15Z

Weaknesses
  • CWE-338

    Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)