{"answers":{"affected":"4 open source packages ship an affected version, including dbt-core.","exploited":"There is no known exploitation of GHSA-p72q-h37j-3hq7 in the wild and no public exploit code.","fix":"Upgrade dbt-core to a fixed version for your release line: 1.6.13 or 1.7.13.","what":"GHSA-p72q-h37j-3hq7 is a denial of service vulnerability in dbt-core, published on 22 Apr 2024."},"fix_prompt":"Check this codebase for GHSA-p72q-h37j-3hq7 and fix it if it is affected.\n\nWhat it is: GHSA-p72q-h37j-3hq7 is a denial of service vulnerability in dbt-core, published on 22 Apr 2024. \nExploitation: There is no known exploitation of GHSA-p72q-h37j-3hq7 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.13\n- dbt-core (PyPI): affected from 1.6.0; fixed in 1.6.13\n- dbt-core (PyPI): affected from 1.7.0; fixed in 1.7.13\n- dbt-core (PyPI): affected from 1.7.0; fixed in 1.7.13\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/GHSA-p72q-h37j-3hq7/ (Markdown: https://insights.sbomify.com/GHSA-p72q-h37j-3hq7/index.md)","id":"GHSA-p72q-h37j-3hq7","markdown":"https://insights.sbomify.com/GHSA-p72q-h37j-3hq7/index.md","name":"GHSA-p72q-h37j-3hq7","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"dbt-core","requires_auth":"none","summary":"An attacker can cause a denial of service in dbt-core by triggering a recursion error in the bundled sqlparse library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"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","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"dbt uses a SQLparse version with a high vulnerability","id":"GHSA-p72q-h37j-3hq7","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2024"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["1.6.13"],"introduced":["1.6.0"],"last_affected":[],"package":"dbt-core","purl":null,"source":"GHSA-p72q-h37j-3hq7"},{"ecosystem":"PyPI","fixed":["1.6.13"],"introduced":["1.6.0"],"last_affected":[],"package":"dbt-core","purl":"pkg:pypi/dbt-core","source":"GHSA-p72q-h37j-3hq7"},{"ecosystem":"PyPI","fixed":["1.7.13"],"introduced":["1.7.0"],"last_affected":[],"package":"dbt-core","purl":null,"source":"GHSA-p72q-h37j-3hq7"},{"ecosystem":"PyPI","fixed":["1.7.13"],"introduced":["1.7.0"],"last_affected":[],"package":"dbt-core","purl":"pkg:pypi/dbt-core","source":"GHSA-p72q-h37j-3hq7"}],"products":null,"published":"2024-04-22","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can cause a denial of service in dbt-core by triggering a recursion error in the bundled sqlparse library.","url":"https://insights.sbomify.com/GHSA-p72q-h37j-3hq7/"}