HIGH 7.4

CVE-2026-7830: UltraVNC MS-Logon II Weak Cryptography Credential Disclosure

UltraVNC versions through 1.8.2.2 contain a critical weakness in how it secures remote desktop connections using MS-Logon II authentication. The vulnerability allows an attacker who can monitor network traffic—whether through packet sniffing, session recording, or man-in-the-middle positioning—to recover login credentials in plaintext. The flaw stems from two problems: the encryption uses weak 64-bit parameters that can be broken in under a second, and the session key generation relies on predictable random numbers seeded from the system clock, making it recoverable within a minute. Once an attacker obtains the session key, they can decrypt and steal the username and password being transmitted. This is a serious risk for any organization relying on UltraVNC for remote access, especially over untrusted networks.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.4 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Weaknesses (CWE)
CWE-326, CWE-338
Affected products
1 configuration(s)
Published / Modified
2026-07-01 / 2026-07-09

NVD description (verbatim)

UltraVNC through 1.8.2.2 uses inadequate cryptography in the MS-Logon II authentication scheme (rfbUltraVNC_MsLogonIIAuth). In rfb/dh.cpp the Diffie-Hellman key exchange is performed with parameters that fit in an unsigned 64-bit integer (DH_MAX_BITS controls the prime size). A 64-bit DH key can be broken by Pollard's rho algorithm in under one second on current hardware. Additionally, the private exponent is generated by the rng() function, which multiplies three libc rand() values seeded from time(NULL). With approximately 31 bits of internal state and a time-based seed, the private exponent is recoverable in under a minute by a passive observer. A network attacker who can observe the MS-Logon II handshake (via sniffing, recording, or man-in-the-middle) can derive the shared DH key and decrypt the encapsulated username and password, resulting in full credential disclosure. This affects legacy MS-Logon II connections; MS-Logon III (X25519 + AES-256-GCM) is unaffected.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The MS-Logon II authentication scheme in UltraVNC implements a Diffie-Hellman key exchange with inadequate parameters. The DH_MAX_BITS constant limits the prime modulus to fit within a 64-bit unsigned integer, making the key exchange vulnerable to Pollard's rho discrete logarithm algorithm, which can recover the shared secret in subsecond time on modern hardware. Additionally, the private exponent generation in rfb/dh.cpp relies on the rng() function, which seeds three concatenated libc rand() calls with time(NULL). This yields approximately 31 bits of effective entropy, allowing a passive network observer to brute-force the private exponent in under a minute. An attacker observing the MS-Logon II handshake can thus derive the shared DH key, decrypt the authentication payload, and obtain credentials in plaintext. The vulnerability is specific to the legacy MS-Logon II protocol; the newer MS-Logon III variant, which uses X25519 elliptic-curve cryptography and AES-256-GCM, is not affected.

Business impact

Organizations using UltraVNC for remote desktop access face credential compromise on every legacy MS-Logon II connection. An attacker with network visibility—whether internal, positioned on a compromised router, or controlling a compromised ISP segment—can passively harvest login credentials without triggering host-based alarms. This directly enables lateral movement, privilege escalation, and persistent access to critical infrastructure. For regulated industries (healthcare, finance, energy), credential theft from remote access tools often triggers breach notification obligations. The impact is amplified in environments where UltraVNC is the primary remote desktop solution or used for administrative access to sensitive systems.

Affected systems

UltraVNC through version 1.8.2.2 is affected when using the MS-Logon II authentication method. This includes all instances explicitly configured for or defaulting to MS-Logon II authentication. Verify your deployment: check the UltraVNC server and viewer configurations to confirm which authentication scheme is active. Administrators who have already migrated to MS-Logon III or other modern authentication (e.g., TLS-based schemes) are not impacted by this specific vulnerability, though they should still validate their configuration. Legacy installations, particularly those running older stable versions, are at highest risk.

Exploitability

This vulnerability requires network-level access to observe the MS-Logon II handshake—it cannot be exploited blindly. However, the attack is entirely passive once that network vantage point is achieved, making it detectable only through traffic analysis or endpoint logging. The computational cost is negligible on current hardware (under one second to break the DH exchange, under one minute to recover the session key). The attacker requires no prior authentication, no user interaction, and no exploitation of a service vulnerability; credential interception via cryptanalysis alone is sufficient. The CVSS score of 7.4 (HIGH) reflects the high confidentiality impact, though the AC:H (Attack Complexity High) rating accounts for the requirement to have network-level observation capability.

Remediation

Immediate mitigation: Disable MS-Logon II authentication on all UltraVNC deployments and migrate to MS-Logon III or another modern, authenticated encryption scheme (e.g., TLS with strong ciphers). Long-term: Upgrade UltraVNC to the latest version once a patch is released that removes or deprecates MS-Logon II. For organizations unable to upgrade immediately, implement network segmentation and VPN enforcement to ensure UltraVNC traffic is only accessible over encrypted, authenticated channels that provide cryptographic assurance independent of the VNC authentication method. Monitor and rotate credentials for any accounts that may have been used over unpatched UltraVNC connections during the vulnerability window.

Patch guidance

Watch the official UltraVNC project repository and security advisories for a patch that addresses the weak DH parameters and RNG seed mechanism. The vendor should deprecate MS-Logon II entirely or, at minimum, increase DH_MAX_BITS to at least 2048 bits and replace the seeded rand() calls with a cryptographically secure random number generator. Verify patch applicability against the vendor advisory before deployment. In the interim, configuration-based mitigation (enforcing MS-Logon III or disabling legacy authentication) is the preferred approach if available in your UltraVNC build.

Detection guidance

Network detection: Inspect encrypted UltraVNC traffic for MS-Logon II handshake patterns (observable by byte sequences in the authentication phase before encryption). A SIEM rule correlating observed handshakes with subsequent credential use can flag suspicious patterns. Endpoint detection: Audit UltraVNC configuration files and registry entries (Windows) to identify which authentication method is active; log any switches to MS-Logon II. Credential monitoring: Implement password change auditing for accounts used with UltraVNC; any unexpected changes may indicate silent compromise. Threat hunting: Review network packet captures or flow data from periods when UltraVNC was in use to check for signs of credential exfiltration or lateral movement originating from remote sessions.

Why prioritize this

This vulnerability should be prioritized as HIGH for any organization using UltraVNC with MS-Logon II authentication. The combination of passive exploitability, direct credential disclosure, and potential impact on high-privilege remote access justifies immediate configuration review and mitigation. Even organizations that have already upgraded should verify the authentication method in use, because legacy configurations may remain active inadvertently. If UltraVNC is used for administrative or sensitive-system access, prioritization should be CRITICAL.

Risk score, explained

The CVSS 3.1 score of 7.4 (HIGH) reflects a high-confidentiality impact (credentials disclosed) and high-integrity risk (attacker can impersonate user), balanced by the requirement for network-level observation (Attack Complexity High). No availability impact is assessed. The score appropriately captures the severity for most deployments; organizations using UltraVNC as a primary remote access tool or for privileged access should consider this vulnerability as functionally CRITICAL in their risk model, as credential compromise directly enables system takeover.

Frequently asked questions

If I'm already using MS-Logon III or TLS authentication in UltraVNC, am I affected?

No. The vulnerability is specific to the legacy MS-Logon II protocol. MS-Logon III uses X25519 elliptic-curve cryptography and AES-256-GCM, which are not vulnerable to the weak 64-bit DH or seeded RNG issues. However, verify your configuration to confirm MS-Logon III is actually in use; if your system falls back to MS-Logon II for compatibility, you remain at risk.

Do I need network access to exploit this vulnerability?

Yes. An attacker must be positioned on the network path (or otherwise able to sniff or record traffic) to observe the MS-Logon II authentication handshake. They cannot exploit this vulnerability without that observation capability. However, once positioned, the attack is entirely passive and does not require user interaction or prior authentication.

How quickly can an attacker recover credentials after observing a handshake?

The attacker can recover the shared Diffie-Hellman key in under one second and the private exponent in under one minute, both on standard modern hardware. In practice, the credential decryption occurs as part of the same analysis, so full credential compromise is achievable within seconds to minutes of observation.

What should I do if UltraVNC is embedded in a legacy system I cannot easily patch or upgrade?

First, confirm which authentication method is in use. If you can configure it to use MS-Logon III or TLS without breaking compatibility, do so immediately. If the system is locked to MS-Logon II, isolate it behind a VPN, network access control, or encryption layer (e.g., SSH tunneling) that provides security independent of VNC authentication. Rotate all credentials used with that UltraVNC instance and monitor for suspicious activity.

This analysis is provided for informational and defensive purposes. Organizations must verify all technical details, affected version ranges, and patch availability against official vendor advisories before making deployment decisions. SEC.co does not provide or endorse any exploit code, proof-of-concept, or weaponized attack tools. Deployment of patches and configuration changes should be tested in a non-production environment first. Consult your CISO, system administrators, and vendor support for guidance specific to your environment. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).