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.
{{media:0}}
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
- Navigate to /api/session/properties to obtain the setup-token.
- Get a collaborator URL to track callbacks.
- Run the PoC script with target URL, setup token, and collaborator URL.
- 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.