SecurinZero Days
    Email Us
    Zero-Day Research/CVE-2026-7830
    ▲ HighCVSS 7.4✓ Patched

    31-bit Diffie-Hellman + libc rand() Seed for MS-Logon Key Exchange (UltraVNC)

    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.

    CVE IDCVE-2026-7830
    CVSS v3.17.4 High
    VendorUltraVNC
    CWECWE-326: Inadequate Encryption Strength, CWE-338: Use of Cryptographically Weak PRNG
    DisclosedJun 3, 2026
    StatusFixed
    All advisories
    • 01Description
    • 02Proof of Concept
    • 03Vulnerable Code
    • 04Trigger Conditions
    • 05Impact
    • 06Remediation
    • 07Timeline
    • 08References
    01/Description

    What this actually is.

    Technical background, root cause, and affected surface.

    UltraVNC MS-Logon II uses DH_MAX_BITS=31 (dh.h:44), key space only 2^31. Private exponent is generated by rng()=rand()*rand()*rand()%maxNum seeded with srand(time(NULL)). BSGS key recovery is live-confirmed in 0.010 seconds from a captured handshake. The attacker recovers the shared key and decrypts the Windows username and password in transit.

    Vendor
    UltraVNC
    Product
    UltraVNC
    Severity
    High
    CVSS Score
    7.4
    Status
    Fixed
    Vector
    CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
    CWE
    CWE-326: Inadequate Encryption Strength, CWE-338: Use of Cryptographically Weak PRNG
    02/Proof of Concept

    From one request
    to root shell.

    Reproduced in a sandboxed environment. Requires only LAN or WiFi adjacency.

    7.4CVSS 3.1
    VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
    ScopeUnchanged
    ImpactC:H / I:H / A:N
    SeverityHigh

    BSGS key recovery tool: live confirmed gen=1628590949 mod=2119336411 pub=480274997 → private key 983298996 recovered in 0.010s and verified. predict_challenge.py (private) demonstrates deterministic exponent prediction.

    03/Vulnerable Code

    The bug, and the fix.

    unsigned __int64 rng(unsigned __int64 limit) { return ((((unsigned __int64) rand()) * rand() * rand()) % limit); // dh.cpp:63 } // DH_MAX_BITS=31 (dh.h:44); srand(time(NULL)) at dh.cpp:53 unsigned __int64 maxNum = ((unsigned __int64) 1) << DH_MAX_BITS; // 2^31

    Root cause: DH_MAX_BITS set to 31 (not 2048+). RNG uses libc rand() with time-based seed. Design acknowledged as insufficient by original author in 2006. libsodium is already pinned in vcpkg.json.

    04/Trigger Conditions

    When does this fire?

    All conditions must be true for the exploit to succeed.

    01

    Target authenticates using MS-Logon II. 2. Attacker captures DH handshake (generator, modulus, public key) on the wire. 3. BSGS algorithm recovers private exponent in <1 second. 4. Shared key derived; MS-Logon II challenge/response decrypted → plaintext credentials.

    Required
    05/Impact

    What an attacker does to you.

    Post-exploitation outcomes mapped to CVSS impact metrics.

    Plaintext Windows domain username and password exposed to any passive network observer or MITM. Affects all UltraVNC deployments using MS-Logon II on non-encrypted networks.

    06/Remediation

    Fix it. In this order.

    A runbook, not a checklist. Sequence matters — assume compromise before you act.

    Upgrade to MS-Logon III (X25519+AES-256-GCM via libsodium). Vendor fix: MS-Logon III introduced as preferred path; MS-Logon II retained as backward-compat fallback with runtime security warning when activated.

    Securin advisory — For coordinated remediation support or threat-actor briefings related to CVE-2026-7830, contact disclose@securin.io
    07/Disclosure Timeline

    Vendors moved in days.
    Attackers in hours.

    Reconstructed from vendor advisories, CISA bulletins, and Securin research records.

    2026-06-02: Discovered; 2026-06-03: BSGS key recovery live-confirmed in 0.010s; 2026-06-17: Reported to vendor; 2026-06-17: MS-Logon III fix validated; 2026-09-03: Planned public disclosure

    Timeline recorded · Disclosure coordinated by Securin

    08/References

    Cite, verify, go deeper.

    Primary sources — NVD, CISA KEV, and machine-readable IoC feed.

    NVD

    NVD — CVE-2026-7830

    nvd.nist.gov/vuln/detail/CVE-2026-7830 →
    SEC

    Securin VI — Full Technical Analysis

    vi.securin.io →
    REF

    CVE-2026-7830; rfb/dh.cpp:53,63,68; rfb/dh.h:44; phase3_deep_analysis.md FINDING-002; vuln-disclosure/cve_tracking.md

    Let Securin level up your security posture.

    Get a live exposure assessment, threat-actor briefing tailored to your sector, and IoC mapping for your SIEM.

    Browse all advisories
    SecurinSecurinZero Days

    Securin's zero-day research operation combines frontier AI models with a decade of offensive expertise — discovering, validating, and coordinating the disclosure of high-impact vulnerabilities at a scale and speed no human team achieves alone.

    Glossary
    © 2026 Securin Inc · CVE Numbering Authority
    Privacy Policy·Data Processing Addendum