// 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.
-
Part 1Setup & Recon
4 min readStand 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.
-
Part 2Pre-auth Enumeration
3 min readGo 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.
-
Part 3The Vulnerability
3 min readWalk 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.
-
Part 4Confirming the Injection
3 min readBuild 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.
-
Part 5Packaging the Scanner
4 min readTurn the script into a proper CLI — argument flags, an opt-in confirmation check, enterprise version handling, and clean exit codes for scripting.