Summary
Metabase contains a critical SQL injection vulnerability in the /reset_password database endpoint. A remote, unauthenticated attacker may inject arbitrary SQL and potentially gain administrator access to the connected Metabase instance.
Affected context
The vulnerability occurs in Metabase deployments that expose the affected password-reset database endpoint and allow attacker-controlled input to reach a database query without adequate parameterization. Because the endpoint is described as remotely reachable without authentication, internet-exposed or otherwise accessible instances may face elevated risk.
Exploit preconditions
- Attack surface: The Metabase
/reset_passworddatabase endpoint - Required access: Network reachability to the endpoint; authentication may not be required
- Trigger point: Processing attacker-controlled input as part of a password-reset database operation
- Why exploitation is possible: Input is incorporated into SQL processing without sufficient separation between data and query structure
Why this happens
The underlying bug is an SQL injection flaw, mapped to CWE-89. The affected code path appears to construct or execute database queries using externally controlled values without consistently applying parameterized queries, safe query APIs, or equivalent enforcement of data-only interpretation. As a result, database input can influence query logic rather than being treated solely as a value.
Potential impact
- An attacker may read, modify, or delete data in the connected database
- An attacker could bypass intended password-reset controls
- An attacker may obtain administrator access to the Metabase instance
- Metabase configuration, dashboards, credentials, or connected-data metadata could be exposed
- The connected database and dependent systems may be disrupted or compromised
General mitigation guidance
Mitigation generally focuses on ensuring that all database operations treat external input strictly as data.
Common defensive patterns include:
- Using parameterized queries, prepared statements, or safe query-builder APIs
- Avoiding string concatenation or interpolation when constructing SQL
- Applying allowlists and strict type validation to endpoint parameters
- Separating password-reset authorization logic from database query construction
- Limiting database accounts to the minimum required permissions
- Restricting network access to administrative and password-reset endpoints where practical
- Preventing sensitive credentials and administrative tokens from being exposed through query results or logs
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis rules identifying SQL string concatenation or interpolation with request-derived values
- Code review checks for database calls that do not use parameter binding
- Tests that verify special-character input remains data and cannot alter query behavior
- Web-application monitoring for unusual requests to password-reset endpoints and unexpected database errors
- Database audit logging for anomalous queries, privilege changes, or access to sensitive tables
- Policy enforcement requiring approved parameterized database-access libraries
Automated code-review and application-security tools may help identify unsafe query-construction patterns before deployment.

