# dbt has an implicit override for built-in materializations from installed packages

Advisory record · `GHSA-p3f3-5ccg-83xq`

- **Identifiers:** `GHSA-p3f3-5ccg-83xq` · `CVE-2024-40637` · `PYSEC-2024-66`
- **State:** Confirmed
- **Severity:** CVSS 4.2 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-74](https://cwe.mitre.org/data/definitions/74.html) · [CWE-89](https://cwe.mitre.org/data/definitions/89.html) · [CWE-913](https://cwe.mitre.org/data/definitions/913.html)
- **Tags:** [Other injection](https://agentprime.io/advisories/tag/injection.md) · [SQL injection](https://agentprime.io/advisories/tag/sql-injection.md) · [CWE-913](https://agentprime.io/advisories/tag/cwe-913.md)
- **Published:** 17 Jul 2024
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 17 Jul 2024, 15:52 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `dbt-core` (PyPI): affected `>=1.6.0, <1.6.14 || >=1.7.0, <1.7.14`; fixed in `1.6.14`, `1.7.14`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> dbt-core versions 1.6.0 before 1.6.14 and 1.7.0 before 1.7.14 are affected. A materialization defined in an installed package that shares a name with a built-in materialization was preferred by default, so a malicious package could replace dbt's behavior with harmful code. Upgrade to dbt-core 1.6.14, 1.7.14, or 1.8.0 or later. For older versions, set the flag require_explicit_package_overrides_for_builtin_materializations to False in dbt_project.yml to require explicit overrides.

Written 5 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 4.2 Medium, CVSS 3.1: `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0037, the 31st percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:35 UTC: First seen by agentprime
- 31 Oct 2026, 14:35 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-p3f3-5ccg-83xq)

## Sources

- [GitHub Advisory Database: GHSA-p3f3-5ccg-83xq](https://github.com/advisories/GHSA-p3f3-5ccg-83xq)
- [OSV: GHSA-p3f3-5ccg-83xq](https://osv.dev/vulnerability/GHSA-p3f3-5ccg-83xq)
- <https://github.com/dbt-labs/dbt-core/security/advisories/GHSA-p3f3-5ccg-83xq>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-40637>
- <https://github.com/dbt-labs/dbt-core/commit/3c82a0296d227cb1be295356df314c11716f4ff6>
- <https://github.com/dbt-labs/dbt-core/commit/87ac4deb00cc9fe334706e42a365903a1d581624>
- <https://docs.getdbt.com/docs/build/packages>
- <https://docs.getdbt.com/reference/global-configs/legacy-behaviors#behavior-change-flags>
- <https://github.com/dbt-labs/dbt-core>
- <https://github.com/pypa/advisory-database/tree/main/vulns/dbt-core/PYSEC-2024-66.yaml>
- <https://tempered.works/posts/2024/07/06/preventing-data-theft-with-gcp-service-controls>
- <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>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-p3f3-5ccg-83xq>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-p3f3-5ccg-83xq/>. Everything for agents: <https://agentprime.io/llms.txt>.
