Skip to main content

SQLFluff CVE-2026-46373

HIGH
Uncontrolled Recursion (CWE-674)
2026-05-19 https://github.com/sqlfluff/sqlfluff GHSA-wmhf-fqc8-vxhh
7.5
CVSS 3.1 · Vendor: https://github.com/sqlfluff/sqlfluff
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify service that lints user-supplied SQL
  2. Delivery
    Craft SQL with deep nested structures
  3. Exploit
    Submit query to lint endpoint
  4. Execution
    Parser recurses uncontrollably
  5. Persist
    Stack/CPU exhaustion crashes worker
  6. Impact
    Repeat to keep service unavailable

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that the target application expose the SQLFluff parser to untrusted input - specifically, a deployment where a remote user can submit arbitrary SQL strings that are then handed to sqlfluff for linting or parsing (for example, a hosted SQL lint/format endpoint, a query-validation API, or a data tool that lints user queries server-side). No authentication is required per CVSS (PR:N) and no user interaction is needed (UI:N); the attacker needs only to be able to reach the lint endpoint and submit a SQL payload with deeply nested constructs. Exploitation is meaningfully LIMITED by the fact that the overwhelmingly common SQLFluff deployment is local - running in a developer's shell, pre-commit hook, or CI job against the team's own SQL - where there is no untrusted submitter and thus no exposure. Installations on version 4.1.0 or later are also limited because the default-enabled configurable recursion limit blocks the resource exhaustion before it succeeds.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H reflects a clean availability-only impact: network-reachable, low complexity, no privileges, no user interaction, with high impact to availability only and no confidentiality or integrity loss. Real-world risk depends heavily on deployment: most SQLFluff users run it locally in CI or pre-commit, where the network vector does not apply, but services that accept user-supplied SQL for linting (hosted query tools, data platforms, BI front-ends) are directly exposed. The issue is not in CISA KEV and no public exploit has been identified, and EPSS data was not provided in the input, so prioritization should be driven primarily by exposure rather than known exploitation. CVSS scores network vector, but exploitability in practice is gated by whether the deploying application actually accepts untrusted SQL - verify deployment context before treating as urgent.

Exploit ScenarioDerived

An attacker identifies a public-facing service (such as a hosted SQL formatter, data-platform query validator, or developer tool) that passes user-submitted SQL to SQLFluff for linting. They submit a single crafted query containing thousands of nested parentheses or subqueries, which drives the parser into deep recursion that exhausts the Python stack and CPU, hanging or crashing the worker; repeating the request across workers takes the lint service offline. No public exploit code has been identified, but the payload is trivial to generate programmatically.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Denial of service in SQLFluff (Python SQL linter/parser) below version 4.1.0 allows remote attackers to exhaust server resources by submitting SQL queries with deliberately excessive nesting, triggering uncontrolled recursion in the parser. The flaw (CWE-674) affects any application that accepts untrusted SQL input for linting and carries a CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/A:H); no public exploit identified at time of analysis and EPSS data was not provided.

RemediationAI

Vendor-released patch: SQLFluff 4.1.0. Upgrade the sqlfluff PyPI package to 4.1.0 or later (for example, pip install --upgrade 'sqlfluff>=4.1.0') in any application, CI pipeline, or service that lints SQL, and pin the minimum version in requirements files and lockfiles to prevent regressions. Version 4.1.0 introduces a configurable recursion limit that is enabled by default; review the configuration if your workloads include legitimate deeply-nested SQL and tune the limit rather than disabling it. If immediate upgrade is impossible for services exposing linting to untrusted users, compensating controls include rejecting or truncating SQL inputs above a conservative byte/character size, capping parenthesis or keyword nesting depth at the application layer before invoking the parser, running the linter in an isolated subprocess with strict CPU and memory ulimits (so a crash does not affect the parent service), and rate-limiting the lint endpoint per source - each of these reduces availability risk but may reject some legitimate complex queries. Full advisory: https://github.com/sqlfluff/sqlfluff/security/advisories/GHSA-wmhf-fqc8-vxhh.

Affected Packages

pypi sqlfluff fix: 4.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SQLFluff is a popular open-source SQL linter and parser distributed via PyPI (pkg:pip/sqlfluff) and used in CI pipelines, IDE plugins, and hosted linting services. The underlying weakness is CWE-674 (Uncontrolled Recursion): the parser's grammar walks deeply nested SQL constructs recursively without a hard depth limit, so a query with deliberately deep nesting causes the Python call stack and CPU/memory to be consumed until the process crashes or becomes unresponsive. Because SQLFluff is often embedded as a library inside web services or developer-platform integrations that expose 'lint this query' endpoints, the recursion issue becomes a network-reachable DoS rather than a purely local one.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/sqlfluff/sqlfluff) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Primary rating from Vendor (https://github.com/sqlfluff/sqlfluff) · only source for this CVE.

CVSS VectorVendor: https://github.com/sqlfluff/sqlfluff

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

SQLFluff, a Python SQL linting tool widely used in development pipelines, contains a remote denial-of-service vulnerability affecting versions below 4.1.0. Attackers can disable or degrade linting services by submitting specially-crafted SQL queries without authentication, potentially halting development workflows and CI/CD processes for any organization using this tool.

Business Impact: High
Compensating Controls

Implement input validation to limit SQL query nesting depth; apply rate limiting and request throttling on SQLFluff endpoints; run SQLFluff in resource-constrained containers with enforced CPU and memory limits; restrict network access to SQLFluff services to authorized internal networks only; monitor vendor for patch release.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:pip/sqlfluff

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy