Intel

AIKIDO-2026-564179

dbt-redshift is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-qmr6-hq48-36qr Published 3 days ago

77

High Risk

This Affects:

PYTHONdbt-redshift
1.5.0 - 1.11.0
Fixed in 1.11.1
Are you affected? Scan for Free

TL;DR

The dbt-redshift adapter calls sqlparse.split() on every executed statement inside its add_query() connection path. It pins sqlparse>=0.5.0,<0.6.0, holding the parser on a version whose lexer is affected by an upstream ReDoS issue, so crafted SQL containing pathological dollar-quoted literals or multiline-comment patterns drives the tokenizer into super-linear regex backtracking. Processing such input through any query path such as run, build, test, seed, snapshot, or hooks consumes unbounded CPU and can hang the invocation with no length limit or timeout. The fix relaxes the sqlparse upper bound so the patched, ReDoS-resistant lexer is used.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and untrusted or externally influenced SQL can reach query execution, for example models, seeds, hooks, or package dependencies contributed by parties you do not fully trust.

Background info

dbt-redshift is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 1.5.0 - 1.11.0.

How to fix this

Upgrade the dbt-redshift library to the patch version.