---
id: CVE-2026-46373
aliases:
  - GHSA-wmhf-fqc8-vxhh
  - PYSEC-2026-209
title: 'SQLFluff: Recursive Stack Overflow in Parser'
summary: 'SQLFluff: Recursive Stack Overflow in Parser'
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
vendor: sqlfluff
product: sqlfluff
ecosystem: pip
affected:
  - sqlfluff < 4.1.0
patched:
  - sqlfluff 4.1.0
published: '2026-05-19'
updated: '2026-07-06'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-wmhf-fqc8-vxhh'
references:
  - url: >-
      https://github.com/sqlfluff/sqlfluff/security/advisories/GHSA-wmhf-fqc8-vxhh
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-46373'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/sqlfluff/PYSEC-2026-209.yaml
  - url: 'https://github.com/sqlfluff/sqlfluff'
tags:
  - osv
  - pip
epss: 0.0046
epssPercentile: 0.37242
ingestedAt: '2026-07-08T18:25:53.849Z'
---

## Overview

### Impact

In deployments where untrusted users can provide SQL queries to be linted, an untrusted user can submit a malicious query with deliberate excessive nesting to any application using the parser to trigger a Denial of Service through resource exhaustion.

### Patches

Versions 4.1.0 and up contain a configurable recursion limit, which is enabled by default, to prevent this manner of exploit.

### Credit

Ori Nakar from Imperva Threat Research Team.

## Affected packages

- `sqlfluff < 4.1.0`

## Remediation

Upgrade to a patched release:

- `sqlfluff 4.1.0`
