CVE-2024-40637: Implicit override for built-in materializations from installed packages in dbt-core
Impact What kind of vulnerability is it? Who is impacted?
When a user installs a package in dbt, it has the ability to override macros, materializations, and other core components of dbt. This is by design, as it allows packages to extend and customize dbt's functionality. However, this also means that a malicious package could potentially override these components with harmful code.
Patches Has the problem been patched? What versions should users upgrade to?
Fixed on 1.8.0, and patched for 1.6.14 and 1.7.14 releases.
Workarounds Is there a way for users to fix or remediate the vulnerability without upgrading?
Previously, a materialization defined in a package that shared a name with one of the built-in materializations would be preferred by default, without user action which is surprising and makes it more difficult to detect the insecure behaviour. We've changed the default behaviour to require explicit overrides by users in 1.8.0, and provided the ability to opt-out of built-in materialization overrides in 1.6 and 1.7 via the flags.requireexplicitpackageoverridesforbuiltinmaterializations: False configuration in dbtproject.yml
Versions older than 1.6 are EOL.
References Are there any links users can visit to find out more? dbt documentation: https://docs.getdbt.com/reference/global-configs/legacy-behaviors#behavior-change-flags https://www.elementary-data.com/post/are-dbt-packages-secure-the-answer-lies-in-your-dwh-policies https://www.equalexperts.com/blog/tech-focus/are-you-at-risk-from-this-critical-dbt-vulnerability/ https://tempered.works/posts/2024/07/06/preventing-data-theft-with-gcp-service-controls/
Other sources
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications. When a user installs a package in dbt, it has the ability to override macros, materializations, and other core components of dbt. This is by design, as it allows packages to extend and customize dbt's functionality. However, this also means that a malicious package could potentially override these components with harmful code. This issue has been fixed in versions 1.8.0, 1.6.14 and 1.7.14. Users are advised to upgrade. There are no kn own workarounds for this vulnerability. Users updating to either 1.6.14 or 1.7.14 will need to set flags.requireexplicitpackageoverridesforbuiltinmaterializations: False in their configuration in dbtproject.yml.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-40637?
CVE-2024-40637 has been categorized with a high severity due to its potential to allow malicious packages to override core components in dbt.
How do I fix CVE-2024-40637?
To mitigate CVE-2024-40637, update dbt-core to version 1.7.14 or later, or 1.6.14 or later.
Who is affected by CVE-2024-40637?
CVE-2024-40637 affects users of dbt-core versions between 1.6.0 to 1.6.14 and 1.7.0 to 1.7.14.
What can attackers do with CVE-2024-40637?
Attackers can exploit CVE-2024-40637 to install malicious packages that override dbt's macros and materializations.
Are there any specific versions of dbt-core I should avoid due to CVE-2024-40637?
You should avoid using dbt-core versions prior to 1.6.14 or between 1.7.0 and 1.7.14 to protect against CVE-2024-40637.