{"id":"GHSA-p72q-h37j-3hq7","aliases":[],"status":"published","title":"dbt uses a SQLparse version with a high vulnerability","description":"### Summary\n\nUsing a version of `sqlparse` that has a security vulnerability and no way to update in current version of dbt core. Snyk recommends using `sqlparse==0.5` but this causes a conflict with dbt. Snyk states the issues is a recursion error: `SNYK-PYTHON-SQLPARSE-6615674`.\n\n### Details\nDependency conflict error message:\n```sh\nThe conflict is caused by:\n    The user requested sqlparse==0.5\n    dbt-core 1.7.10 depends on sqlparse\u003c0.5 and \u003e=0.2.3\n```\nResolution was to pin `sqlparse \u003e=0.5.0, \u003c0.6.0` in `dbt-core`, patched in 1.6.13 and 1.7.13.\n\n### PoC\nFrom Snyk:\n\n```python\nimport sqlparse\nsqlparse.parse('[' * 10000 + ']' * 10000)\n```\n\n### Impact\nSnyk classifies it as high 7.5/10.\n\n### Patches\nThe bug has been fixed in [dbt-core v1.6.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.6.13) and [dbt-core v1.7.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.7.13).\n\n### Mitigations\nBump `dbt-core` 1.6 and 1.7 dependencies to 1.6.13 and 1.7.13 respectively","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-673"],"published":"2024-04-22T22:17:59Z","modified":"2024-12-05T05:28:27Z","fixes":[{"ecosystem":"PyPI","package":"dbt-core","fixed_in":["1.6.13","1.7.13"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"dbt-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.6.0"},{"fixed":"1.6.13"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"dbt-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.7.0"},{"fixed":"1.7.13"}]}]},{"source":"osv","ecosystem":"PyPI","package":"dbt-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.6.0"},{"fixed":"1.6.13"}]}],"versions":["1.6.0","1.6.1","1.6.10","1.6.11","1.6.12","1.6.1rc1","1.6.2","1.6.3","1.6.4","1.6.5","1.6.6","1.6.7","1.6.8","1.6.9"]},{"source":"osv","ecosystem":"PyPI","package":"dbt-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.7.0"},{"fixed":"1.7.13"}]}],"versions":["1.7.0","1.7.1","1.7.10","1.7.11","1.7.12","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.7","1.7.8","1.7.9"]}],"references":[{"url":"https://github.com/dbt-labs/dbt-core/security/advisories/GHSA-p72q-h37j-3hq7","tags":["web"]},{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-SQLPARSE-6615674","tags":["web"]},{"url":"https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-2m57-hf25-phgg","tags":["web"]},{"url":"https://github.com/advisories/GHSA-p72q-h37j-3hq7"},{"url":"https://github.com/dbt-labs/dbt-core","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-p72q-h37j-3hq7","title":"dbt uses a SQLparse version with a high vulnerability","description":"### Summary\n\nUsing a version of `sqlparse` that has a security vulnerability and no way to update in current version of dbt core. Snyk recommends using `sqlparse==0.5` but this causes a conflict with dbt. Snyk states the issues is a recursion error: `SNYK-PYTHON-SQLPARSE-6615674`.\n\n### Details\nDependency conflict error message:\n```sh\nThe conflict is caused by:\n    The user requested sqlparse==0.5\n    dbt-core 1.7.10 depends on sqlparse\u003c0.5 and \u003e=0.2.3\n```\nResolution was to pin `sqlparse \u003e=0.5.0, \u003c0.6.0` in `dbt-core`, patched in 1.6.13 and 1.7.13.\n\n### PoC\nFrom Snyk:\n\n```python\nimport sqlparse\nsqlparse.parse('[' * 10000 + ']' * 10000)\n```\n\n### Impact\nSnyk classifies it as high 7.5/10.\n\n### Patches\nThe bug has been fixed in [dbt-core v1.6.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.6.13) and [dbt-core v1.7.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.7.13).\n\n### Mitigations\nBump `dbt-core` 1.6 and 1.7 dependencies to 1.6.13 and 1.7.13 respectively","status":"published","published":"2024-04-22T22:17:59Z","modified":"2024-04-22T22:18:57Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-673"],"updated_at":"2026-11-02T14:37:44.335614Z"}],"osv":[{"id":"GHSA-p72q-h37j-3hq7","title":"dbt uses a SQLparse version with a high vulnerability","description":"### Summary\n\nUsing a version of `sqlparse` that has a security vulnerability and no way to update in current version of dbt core. Snyk recommends using `sqlparse==0.5` but this causes a conflict with dbt. Snyk states the issues is a recursion error: `SNYK-PYTHON-SQLPARSE-6615674`.\n\n### Details\nDependency conflict error message:\n```sh\nThe conflict is caused by:\n    The user requested sqlparse==0.5\n    dbt-core 1.7.10 depends on sqlparse\u003c0.5 and \u003e=0.2.3\n```\nResolution was to pin `sqlparse \u003e=0.5.0, \u003c0.6.0` in `dbt-core`, patched in 1.6.13 and 1.7.13.\n\n### PoC\nFrom Snyk:\n\n```python\nimport sqlparse\nsqlparse.parse('[' * 10000 + ']' * 10000)\n```\n\n### Impact\nSnyk classifies it as high 7.5/10.\n\n### Patches\nThe bug has been fixed in [dbt-core v1.6.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.6.13) and [dbt-core v1.7.13](https://github.com/dbt-labs/dbt-core/releases/tag/v1.7.13).\n\n### Mitigations\nBump `dbt-core` 1.6 and 1.7 dependencies to 1.6.13 and 1.7.13 respectively","status":"published","published":"2024-04-22T22:17:59Z","modified":"2024-12-05T05:28:27.29687Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-673"],"updated_at":"2026-11-02T15:46:52.891208Z"}]}}
