CVE-2024-40637: dbt has an implicit override for built-in materializations from installed packages
4.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.22892%
CWE
Published
7/17/2024
Updated
11/18/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dbt-core | pip | >= 1.6.0, < 1.6.14 | 1.6.14 |
dbt-core | pip | >= 1.7.0, < 1.7.14 | 1.7.14 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how dbt resolves materialization macros. The find_materialization_macro_by_name function's logic in manifest.py was modified in the patch to add security checks. Pre-patch behavior: 1) It sorted macro candidates by specificity 2) Returned the last candidate (highest precedence) 3) Allowed package macros to override core materializations by default. The commit diff shows critical changes to this function including deprecation warnings and flag checks (require_explicit_package_overrides_for_builtin_materializations), confirming this was the injection point for unauthorized overrides.