SecurinZero Days
    Email Us
    Zero-Day Research/CVE-2026-44040
    ▲ MediumCVSS 4.8✓ Patched

    libc rand() Used for VNC Auth Challenge Generation (UltraVNC)

    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.

    CVE IDCVE-2026-44040
    CVSS v3.14.8 Medium
    VendorUltraVNC
    CWECWE-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.

    vncRandomBytes() in rfb/vncauth.c:119-129 seeds libc rand() with time(0)+getpid()+rand() and generates a 16-byte VNC auth challenge. The combined seed space is ~31 bits (libc rand() internal state). Note: Windows builds may use CryptGenRandom via vncEncryptBytes2.cpp — Windows-path reachability pending compile-graph verification.

    Vendor
    UltraVNC
    Product
    UltraVNC Server
    Severity
    Medium
    CVSS Score
    4.8
    Status
    Fixed
    Vector
    CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
    CWE
    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.

    4.8CVSS 3.1
    VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
    ScopeUnchanged
    ImpactC:L / I:L / A:N
    SeverityMedium

    predict_challenge.py demonstrates deterministic challenge prediction from time-based seed. Private PoC; not released publicly.

    03/Vulnerable Code

    The bug, and the fix.

    // rfb/vncauth.c:119-129 vncRandomBytes(unsigned char *bytes) { srand((unsigned int) time(0) + getpid() + rand()); for (i=0; i<CHALLENGESIZE; i++) bytes[i] = (unsigned char)(rand() & 0xff); }

    Root cause: Legacy cross-platform code uses libc rand() with low-entropy time-based seed. vncEncryptBytes2.cpp with CryptGenRandom was added for Windows but compile-graph verification needed to confirm this file shadows vncauth.c on shipped Windows binaries.

    04/Trigger Conditions

    When does this fire?

    All conditions must be true for the exploit to succeed.

    01

    VNC server sends auth challenge generated by vncRandomBytes(). 2. Attacker observes connection timestamp (passive sniff). 3. Enumerates seed space with time(0)+pid+rand(). 4. Predicts 16-byte challenge; forges valid DES-encrypted response.

    Required
    05/Impact

    What an attacker does to you.

    Post-exploitation outcomes mapped to CVSS impact metrics.

    Predictable VNC auth challenge. With connection timing, attacker brute-forces valid auth responses offline. Impact limited if Windows builds use CryptGenRandom (verification pending).

    06/Remediation

    Fix it. In this order.

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

    Use CryptGenRandom (Windows) or getrandom() (Unix) exclusively. Vendor fix: CryptGenRandom as primary, /dev/urandom as fallback, legacy srand path unreachable last resort.

    Securin advisory — For coordinated remediation support or threat-actor briefings related to CVE-2026-44040, 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 during audit; 2026-06-17: Reported to vendor; 2026-06-17: 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-44040

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

    Securin VI — Full Technical Analysis

    vi.securin.io →
    REF

    CVE-2026-44040; rfb/vncauth.c:119-129; phase3_deep_analysis.md FINDING-001

    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