
Fixes unauthenticated SQL injection in a setup endpoint by replacing raw JDBC queries with ORM parameterization and constant-time token validation.
This repository contains the hotfix for CVE-2026-72898, an unauthenticated SQL Injection vulnerability in the setup endpoint of self-hosted Metabase instances.
Left unpatched, attackers can bypass the setup token validation, execute arbitrary database commands, and extract data warehouse credentials.
The validate-setup-token function previously accepted unvalidated user input and concatenated it directly into a raw JDBC string. This allowed an attacker to break out of the SQL string and append malicious commands.
This patch fundamentally shifts the validation mechanism to neutralize SQL injection vectors:
t2), Metabase's native Object-Relational Mapper.crypto.equality/eq? to compare the tokens in application memory (Clojure) rather than in the database.crypto.equality/eq? function executes in constant time, preventing attackers from brute-forcing the token via timing discrepancies.Replaces the vulnerable raw jdbc/query logic in metabase.api.setup.
Metabase is licensed under the AGPL. This patch is provided under the same terms.