Dbt-labs dbt-core
dbt: Unauthenticated Arbitrary SQL Execution in `dbt docs serve`
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications. From 2.0.0-alpha.0 until 2.0.0-alpha.5, dbt docs serve exposes the unauthenticated POST /api/v1/query endpoint in crates/dbt-docs-server/src/handlers/query.rs, which passes caller-supplied SQL to DuckDbViewsBackend::query_arrow() in crates/dbt-index-core/src/backend.rs without authorization or an allowlist. A client that can reach the server can invoke DuckDB filesystem-reading functions to read files available to the dbt process, including files outside the docs index directory. The server binds to localhost by default, but operators can expose it to a network through the host option or DBT_DOCS_HOST setting. This issue is fixed in version 2.0.0-alpha.5.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 2.0.0-alpha.0, < 2.0.0-alpha.5
Fixed in 2.0.0-alpha.5
Mitigation
Upgrade dbt-core to 2.0.0-alpha.5 or later.
References
- Vendor advisory github.com/dbt-labs/dbt/security/advisories/GH…
- Patch github.com/dbt-labs/dbt/commit/3a5d26fe02b5838…
- Release notes github.com/dbt-labs/dbt/releases/tag/v2.0.0-al…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.