Skip to content
RCE Write-up Intermediate

CVE-2023–38646 — Metabase Pre-Auth RCE

Metabase versions before [redacted] had a flaw in the /api/setup/validate endpoint that allowed unauthenticated attackers to execute arbitrary commands on the server. The exploit used a JDBC connection handling issue to achieve remote code execution with server privileges.

shamooo Follow

Published on infosecwriteups.com

{{media:0}}

shamooo, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a flaw in how the application handled JDBC connection strings during setup validation, allowing injection of malicious parameters that led to code execution.

Impact

An attacker could execute arbitrary commands on the server with the server's privileges, potentially stealing sensitive data or taking control of the infrastructure.

What the attacker needed

Metabase version before [redacted]; Network access to the Metabase instance; No authentication required

The fix

The vulnerability was fixed in versions [redacted], [redacted], and later; users should upgrade immediately or block requests to the vulnerable /api/setup endpoints as a temporary measure.

How it was found

  1. Navigate to /api/session/properties to obtain the setup-token.
  2. Get a collaborator URL to track callbacks.
  3. Run the PoC script with target URL, setup token, and collaborator URL.
  4. Check the collaborator for callbacks to confirm exploitation.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Metabase is a tool for exploring data. A security hole in its setup process let anyone run commands on the server without logging in, which could give them full control. The problem was fixed in later versions.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by shamooo

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.