{"answers":{"affected":"5 open source packages ship an affected version, including dbt-core. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-40637 in the wild and no public exploit code.","fix":"Upgrade dbt-core to a fixed version for your release line: 1.6.14 or 1.7.14.","what":"CVE-2024-40637 is a medium-severity code injection vulnerability in dbt-labs dbt-core, published on 16 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-40637 and fix it if it is affected.\n\nWhat it is: CVE-2024-40637 is a medium-severity code injection vulnerability in dbt-labs dbt-core, published on 16 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-40637 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- dbt-core (PyPI): affected from 1.6.0; fixed in 1.6.14\n- dbt-core (PyPI): affected from 1.6.0; fixed in 1.6.14\n- dbt-core (PyPI): affected from 1.7.0; fixed in 1.7.14, 1.6.14\n- dbt-core (PyPI): affected from 1.7.0; fixed in 1.7.14\n- dbt-core (PyPI): affected from 1.7.0; fixed in 1.7.14\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-40637/ (Markdown: https://insights.sbomify.com/CVE-2024-40637/index.md)","id":"CVE-2024-40637","markdown":"https://insights.sbomify.com/CVE-2024-40637/index.md","name":"CVE-2024-40637","record":{"aliases":["GHSA-p3f3-5ccg-83xq","PYSEC-2024-66"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"dbt-core data tool","requires_auth":"low_privilege","summary":"Malicious dbt packages can implicitly override built-in materializations to execute arbitrary code, requiring users to upgrade dbt-core.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"dbt_core","vendor":"getdbt"}],"cvss":{"score":4.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"description":"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.require_explicit_package_overrides_for_builtin_materializations: False` in their configuration in `dbt_project.yml`.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Implicit override for built-in materializations from installed packages in dbt-core","id":"CVE-2024-40637","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":5,"n_references":8,"next":{"headline":"GLPI allows account takeover via SQL Injection in AJAX scripts","id":"CVE-2024-40638"},"packages":[{"ecosystem":"PyPI","fixed":["1.6.14"],"introduced":["1.6.0"],"last_affected":[],"package":"dbt-core","purl":null,"source":"GHSA-p3f3-5ccg-83xq"},{"ecosystem":"PyPI","fixed":["1.6.14"],"introduced":["1.6.0"],"last_affected":[],"package":"dbt-core","purl":"pkg:pypi/dbt-core","source":"GHSA-p3f3-5ccg-83xq"},{"ecosystem":"PyPI","fixed":["1.7.14","1.6.14"],"introduced":["1.7.0","0"],"last_affected":[],"package":"dbt-core","purl":"pkg:pypi/dbt-core","source":"PYSEC-2024-66"},{"ecosystem":"PyPI","fixed":["1.7.14"],"introduced":["1.7.0"],"last_affected":[],"package":"dbt-core","purl":null,"source":"GHSA-p3f3-5ccg-83xq"},{"ecosystem":"PyPI","fixed":["1.7.14"],"introduced":["1.7.0"],"last_affected":[],"package":"dbt-core","purl":"pkg:pypi/dbt-core","source":"GHSA-p3f3-5ccg-83xq"}],"prev":{"headline":"Basic Auth Credential Leakage to Logs After Fetch Registry Error in Steeltoe.Discovery.Eureka with Peer Awareness","id":"CVE-2024-40636"},"products":["dbt-core"],"published":"2024-07-16","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["dbt-labs"]},"summary":"Malicious dbt packages can implicitly override built-in materializations to execute arbitrary code, requiring users to upgrade dbt-core.","url":"https://insights.sbomify.com/CVE-2024-40637/"}