CVE-2024-40637: Implicit override for built-in materializations from installed packages in dbt-core

Published Jul 16, 2024
·
Updated

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

4 affected componentsFixes available
pip/dbt-core>=1.7.0<1.7.14
1.7.14
pip/dbt-core>=1.6.0<1.6.14
1.6.14
getdbt Dbt Core<1.6.14
getdbt Dbt Core>=1.7.0<1.7.14

Event History

Jul 16, 2024
CVE Published
via MITRE·10:56 PM
Data Sourced
via MITRE·10:56 PM
DescriptionSeverityWeakness
Jul 17, 2024
Advisory Published
via GitHub·03:52 PM

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203