Skip to content
Fencer Intel
high 7.5

GHSA-p72q-h37j-3hq7 json

dbt uses a SQLparse version with a high vulnerability

published 2y ago modified last yr.

cvss
7.5
version 3.1, GitHub
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

### Summary

Using 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`.

### Details Dependency conflict error message: ```sh The conflict is caused by: The user requested sqlparse==0.5 dbt-core 1.7.10 depends on sqlparse<0.5 and >=0.2.3 ``` Resolution was to pin `sqlparse >=0.5.0, <0.6.0` in `dbt-core`, patched in 1.6.13 and 1.7.13.

### PoC From Snyk:

```python import sqlparse sqlparse.parse('[' * 10000 + ']' * 10000) ```

### Impact Snyk classifies it as high 7.5/10.

### Patches The 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).

### Mitigations Bump `dbt-core` 1.6 and 1.7 dependencies to 1.6.13 and 1.7.13 respectively

Patch / fix

  • pypi dbt-core 1.6.13, 1.7.13

Is GHSA-p72q-h37j-3hq7 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CVSS scores

assigned by version score vector
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
pypi dbt-core
>=1.6.0, <1.6.13
>=1.7.0, <1.7.13
1.6.13
1.7.13

Classification

Weakness
  • CWE-673 External Influence of Sphere Definition

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

The maintainers of dbt-labs/dbt published their own advisory on GitHub. Reviewed sources take precedence over it.