Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted enum value to enu() method
-
ExploitSingle quote terminates DDL string literal
-
ExecutionInject stacked SQL into CREATE/ALTER statement
-
ImpactExecute DROP TABLE with DB connection privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application that passes attacker-influenced values into Knex's enu() schema-builder column method so they reach DDL generation; the attacker-supplied enum value must contain a single quote to break out of the string literal. Impact is dialect-dependent: on SQLite it bypasses the generated CHECK constraint, while on PostgreSQL it enables stacked statements such as DROP TABLE, executed with the database connection's privileges. The principal limiting factor is that schema and enum definitions are normally hardcoded by developers, so the flaw is only reachable where untrusted input is routed into schema-building code - a non-default, uncommon pattern reflected in the CVSS AC:H/AT:P/PR:L metrics. |
| Impact | The input CVSS 4.0 score of 7.7 (High) is tempered by its own metrics: AC:H, AT:P and PR:L all indicate exploitation is not trivial or fully unauthenticated, consistent with the real limiting factor - enum values supplied to Knex's enu() column method are normally developer-controlled schema definitions, not user input, so the flaw only becomes reachable in the unusual pattern where untrusted data flows into DDL/schema-building code. No EPSS score was provided in the input, and the CVE is not listed in CISA KEV, so there is no signal of active exploitation; the vuln.today decision label is 'this_week' (not act_now/emergency), aligning with a serious-but-conditional issue rather than a mass-exploited one. This is a genuine SQL injection (CWE-89) with high integrity/availability impact where reachable, but it is better characterized as a high-CVSS flaw gated by an uncommon application pattern than a broadly exploitable priority. Because no EPSS or KEV data is available to confirm or contradict this, prioritization rests on whether a given deployment actually passes attacker-controlled values into schema-builder enum definitions. |
| Exploit ScenarioDerived | An application uses Knex to build or alter table schemas where the enum value list is derived from untrusted input; an attacker submits an enum value containing a single quote (e.g. x') to terminate the string literal inside the generated DDL. On SQLite this neutralizes the intended CHECK constraint, while on PostgreSQL the attacker appends a stacked statement such as DROP TABLE, executed with the database connection's privileges. No confirmed working exploit code is identified in the provided sources. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
SQL injection in Knex through 3.3.0 lets attackers who can influence values passed to the enu() schema-builder column method break out of a string literal in generated DDL, neutralizing SQLite CHECK constraints or running stacked statements such as DROP TABLE on PostgreSQL with the database connection's privileges. Reachability is limited: schema and enum definitions are normally developer-controlled, so exploitation requires the uncommon pattern of routing untrusted input into DDL/schema-building code, consistent with the assessed AC:H, AT:P and PR:L metrics. No public exploit was identified at time of analysis, and the decision label places remediation in the this_week queue.
RemediationAI
No vendor-released patch identified at time of analysis; no fixed version is listed in the supplied references, so track https://github.com/knex/knex/issues/4481 and the VulnCheck advisory for a fix. Until then, remove or gate code paths that pass request data into Knex schema-builder methods, especially enu(); validate enum values against a strict allowlist that rejects single quotes and all non-identifier characters (side effect: legitimate values containing punctuation will be rejected). Where dynamic DDL is unavoidable, generate the DDL outside Knex with explicit, dialect-correct literal/identifier quoting and re-review it before execution. Run migrations and schema-building code with a least-privilege database account that cannot execute stacked DDL such as DROP TABLE (side effect: legitimate migrations needing DDL may fail).
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Knex is a Node.js SQL query builder whose schema builder compiles column definitions into dialect-specific DDL. The enu() column method accepts enum values and emits them into the DDL string; the referenced MySQL, PostgreSQL and SQLite3 column-compiler source lines show where these values are handled, and the flaw is CWE-89 improper neutralization of special elements used in SQL. A single quote in a supplied enum value terminates the literal, so on SQLite the generated CHECK constraint can be neutralized, while on PostgreSQL stacked statements such as DROP TABLE can be executed with the database connection's privileges. The trigger is not described beyond the need for attacker-influenced values to reach enu(); the assessed vector indicates network access, high attack complexity, attack requirements present, low privileges required, and no user interaction.
Know when Knex gets its next vulnerability
- 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
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Injection is network-reachable but requires the uncommon path of untrusted input into schema-builder enum values (AC:H, PR:L); DDL tampering and DROP TABLE give I:H/A:H, with limited read capability (C:L).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Knex through 3.3.0 contains an sql injection vulnerability that allows attackers to inject SQL into DDL statements by supplying enum values containing single quotes to the enu() column method. Attackers can terminate the literal to neutralize SQLite CHECK constraints or execute stacked statements like DROP TABLE on PostgreSQL with the database connection's privileges.
Executive ViewAI
A high-severity SQL injection vulnerability has been identified in Knex, a widely used SQL query builder library, affecting schema-building operations through version 3.3.0. The flaw could allow an attacker to manipulate database schema definitions, potentially neutralizing security constraints or executing destructive database commands like DROP TABLE, though exploitation requires the uncommon scenario where untrusted input is funneled into schema-building code. Leadership should care because this affects a core dependency used across many applications and could lead to data loss or integrity breaches if exploited, with remediation prioritized for this week.
Apply vendor patch.
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
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
knex.js versions before 0.19.5 are vulnerable to SQL Injection attack. Rated critical severity (CVSS 9.8), this vulnerab
SQL injection in Knex through 3.3.0 (MSSQL dialect) lets an attacker who can influence a table or view name passed to dr
SQL injection in the Oracle dialect of the Knex.js query builder, affecting versions through 3.3.0, lets an attacker who
EUVD-2026-141515
GHSA-9hx6-vfgp-fg3m
NVD
CVE.org
Exploit-DB