Skip to main content

SQLFluff CVE-2026-46374

HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-05-19 https://github.com/sqlfluff/sqlfluff GHSA-73jc-5mrq-prw7
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 SQL via SQLFluff
  2. Delivery
    Craft oversized malicious SQL payload
  3. Exploit
    Submit query to linting endpoint
  4. Execution
    Parser allocates unbounded parse nodes
  5. Persist
    CPU and memory exhausted on worker
  6. Impact
    Service becomes unavailable to legitimate users

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application expose the SQLFluff parser/linter to input that the attacker can control - explicitly called out in the advisory as 'deployments where untrusted users can provide SQL queries to be linted.' No authentication is required at the SQLFluff layer (CVSS PR:N) and no user interaction is needed (UI:N), but the attacker must be able to reach an endpoint (HTTP API, web form, CLI wrapper, IDE plugin backend, etc.) that calls SQLFluff with their SQL, and the deployed version must be below 4.2.0 or have the default parse node limit disabled. Purely local developer use of SQLFluff against self-authored SQL is not realistically exploitable because no untrusted input crosses the boundary.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H scores 7.5 and reflects a network-reachable, unauthenticated, low-complexity attack with high availability impact and no impact to confidentiality or integrity, consistent with a pure DoS primitive. EPSS and CISA KEV data were not provided in the input, and no public PoC or active exploitation has been reported, so real-world risk is currently driven by exposure pattern rather than mass exploitation: organizations are only at meaningful risk if they expose SQLFluff to untrusted SQL input (for example a SaaS linting service, hosted notebook, or web IDE), whereas typical CI/developer-workstation usage is low risk because the attacker would already need to control the SQL being linted. There is no evidence of conflict between signals, but defenders should note that the advisory itself frames the issue as conditional on 'deployments where untrusted users can provide SQL queries.'

Exploit ScenarioDerived

An attacker discovers a public web service or SaaS feature that lints user-submitted SQL using SQLFluff (for example a query formatter, schema migration helper, or notebook UI) and submits a deliberately long or deeply nested SQL string crafted to explode the parse-node count. The backend worker pegs CPU and balloons memory while parsing, eventually being OOM-killed or stalling the request queue, denying service to other tenants; repeated submissions amplify the outage with negligible attacker cost.

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 parser (pip/sqlfluff) versions prior to 4.2.0 allows remote unauthenticated attackers to exhaust CPU and memory resources by submitting an excessively long or malicious SQL query for linting. The flaw affects any application that exposes the SQLFluff parser to untrusted input. No public exploit identified at time of analysis, but the issue was responsibly reported by Imperva Threat Research.

RemediationAI

Upgrade SQLFluff to vendor-released patch 4.2.0 or later (pip install --upgrade 'sqlfluff>=4.2.0'), which ships the configurable parse node limit enabled by default; see the advisory at https://github.com/sqlfluff/sqlfluff/security/advisories/GHSA-73jc-5mrq-prw7 for details. If immediate upgrade is not feasible, compensating controls include refusing to lint queries above a strict byte/length threshold at the application boundary before handing them to SQLFluff (trade-off: legitimately large generated SQL may be rejected), running the linter in a sandboxed worker with hard CPU and memory cgroup limits and short wall-clock timeouts so a runaway parse can be killed without affecting the host (trade-off: added operational complexity), and restricting the linting endpoint to authenticated internal users until the upgrade is rolled out (trade-off: removes any public self-service linting feature).

Affected Packages

pypi sqlfluff fix: 4.2.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 widely used Python-based SQL linter and formatter distributed via PyPI (pkg:pip/sqlfluff) that parses SQL into an abstract syntax tree before applying lint rules. The root cause maps to CWE-400 (Uncontrolled Resource Consumption): the parser previously had no upper bound on the number of parse nodes it would generate for a single input query, so an adversarially crafted long query could force the parser to allocate an unbounded tree, consuming CPU cycles and memory until the host process becomes unresponsive. The vendor fix introduces a configurable parse node limit, enabled by default starting in 4.2.0, that aborts parsing once the node ceiling is reached.

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 long query to any application using the parser to trigger a Denial of Service through resource exhaustion.

Patches

Versions 4.2.0 and up contain a configurable parse node 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 (open-source SQL linting library) versions prior to 4.2.0 are vulnerable to denial-of-service attacks that can disable application services through malicious SQL queries. Organizations using SQLFluff in production environments that process untrusted SQL require immediate assessment and mitigation to prevent service disruption. All affected deployments need evaluation within 24 hours.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Enforce maximum SQL query length limits in application code; (2) Configure CPU/memory resource limits and timeouts at application or container layer; (3) Implement rate limiting on linting requests; (4) Restrict SQLFluff access to authenticated internal users and reject external requests; (5) Consider disabling SQLFluff in production if the service is non-critical.

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