SecurinZero Days
    Email Us
    Zero-Day Research/CVE-2026-7840
    ▲ CriticalCVSS 9.8✓ Patched

    Pre-auth Global Buffer Overflow in Repeater HTTP Admin (UltraVNC)

    Pre-auth. hdrbuf[1000] (webio.h:181) overflowed via sprintf(cp,"File: %s",sess->ws_uri) in wi_senderr (webutils.c:93,109). WI_RXBUFSIZE=153600. URI[754] lands at hdrbuf[1000]=wi_execfunc (BSS function pointer). Confirmed live: response[1000:1004]=0x41424344. 1769 bytes returned vs 1000-byte buffer. 18+ year old bug (Webio © 2007)

    CVE IDCVE-2026-7840
    CVSS v3.19.8 Critical
    VendorUltraVNC
    CWECWE-787: Out-of-bounds Write
    DisclosedJun 2, 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.

    Global buffer hdrbuf[1000] in repeater/webgui/webutils.c is filled by unchecked sprintf in wi_senderr() and wi_replyhdr(). HTTP receive buffer accepts URIs up to ~150 KB. A URI ≥1001 bytes overflows hdrbuf, corrupting adjacent .bss globals including function pointers. No authentication required.

    Vendor
    UltraVNC
    Product
    UltraVNC Repeater
    Severity
    Critical
    CVSS Score
    9.8
    Status
    Fixed
    Vector
    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    CWE
    CWE-787: Out-of-bounds Write
    02/Proof of Concept

    From one request
    to root shell.

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

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

    poc_finding005_repeater_overflow_vendor.py: GET /[1500xA] HTTP/1.0 → 404 → wi_senderr writes URI into hdrbuf[1000]. Crash-trigger only; no shellcode.

    03/Vulnerable Code

    The bug, and the fix.

    char hdrbuf[HDRBUFSIZE]; // global 1000 bytes (webio.h:181) char *cp = hdrbuf + strlen(hdrbuf); sprintf(cp, "WWW-Authenticate: Basic realm=\"%s\"", sess->ws_uri); // attacker URI cp += strlen(cp); sprintf(cp, "File: %s<br>", sess->ws_uri); // second overflow

    Root cause: sprintf used instead of snprintf for attacker-controlled URI into a fixed 1000-byte global buffer shared across threads. No URI length validation before response construction.

    04/Trigger Conditions

    When does this fire?

    All conditions must be true for the exploit to succeed.

    01

    Attacker reaches repeater HTTP port (default TCP 80). 2. Sends HTTP request with URI ≥1001 bytes (any method). 3. Server generates 4xx/2xx response. 4. wi_senderr/wi_replyhdr writes full URI into hdrbuf[1000] without length check.

    Required
    05/Impact

    What an attacker does to you.

    Post-exploitation outcomes mapped to CVSS impact metrics.

    RCE as the repeater process user. All relayed VNC sessions exposed. Complete host compromise of the relay node.

    06/Remediation

    Fix it. In this order.

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

    Replace sprintf with snprintf using remaining buffer space as limit. Allocate response buffer per-session. Vendor fix: sprintf → snprintf with HDR_REMAINING bounds; wi_sanitize_uri() added before embedding URI.

    Securin advisory — For coordinated remediation support or threat-actor briefings related to CVE-2026-7840, 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 security audit; 2026-06-17: Reported to UltraVNC team; 2026-06-17: Vendor 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-7840

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

    Securin VI — Full Technical Analysis

    vi.securin.io →
    REF

    CVE-2026-7840; repeater/webgui/webutils.c:87-114; repeater/webgui/webio.h:181; phase3_deep_analysis.md FINDING-005; vuln-disclosure/findings_report.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