// Tutorials

Metabase Exploit Tooling with Bun

Build a Metabase vulnerability scanner in TypeScript on Bun — against a local Metabase you run in Docker. Fingerprint the version, pull the pre-auth setup-token, understand CVE-2023-38646, confirm the H2 injection with a harmless SQL marker, and package the whole thing into one reusable CLI.

  1. Part 1Setup & Recon

    4 min read
    TypeScriptBunReconMetabase

    Stand up a Metabase lab in Docker, wire up a Bun + TypeScript project, and write your first tool — a version fingerprinter that reads Metabase's unauthenticated properties endpoint and decides whether the target is in range for CVE-2023-38646.

  2. Part 2Pre-auth Enumeration

    3 min read
    TypeScriptBunReconMetabase

    Go back to the properties endpoint for the setup-token — the field that turns a version number into an exploit — and shape everything the target leaks before login into typed, structured output.

  3. Part 3The Vulnerability

    3 min read
    TypeScriptMetabaseRCEH2

    Walk CVE-2023-38646 end to end — why a readable setup-token plus Metabase's embedded H2 database turns a "validate my connection" request into code execution.

  4. Part 4Confirming the Injection

    3 min read
    TypeScriptBunMetabaseH2

    Build the H2 connection string, send it through /api/setup/validate, and confirm the injection primitive against the lab with a harmless SQL marker — proof it works, without going further.

  5. Part 5Packaging the Scanner

    4 min read
    TypeScriptBunCLITooling

    Turn the script into a proper CLI — argument flags, an opt-in confirmation check, enterprise version handling, and clean exit codes for scripting.

← All tutorials