SQLFluff CVE-2026-46373
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify service that lints user-supplied SQL
-
DeliveryCraft SQL with deep nested structures
-
ExploitSubmit query to lint endpoint
-
ExecutionParser recurses uncontrollably
-
PersistStack/CPU exhaustion crashes worker
-
ImpactRepeat 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
GHSA-wmhf-fqc8-vxhh
NVD
CVE.org
EPSS
VulDB
Exploit-DB