Unrated severityNVD Advisory· Published Dec 2, 2026
Knex through 3.3.0 SQL Injection via unescaped enu() schema builder values
CVE-2026-142190
Description
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.
Patches
Vulnerability mechanics
References
5- www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-unescaped-enu-schema-builder-valuesmitrethird-party-advisory
- github.com/knex/knex/blob/3.3.0/lib/dialects/mysql/schema/mysql-columncompiler.jsmitretechnical-description
- github.com/knex/knex/blob/3.3.0/lib/dialects/postgres/schema/pg-columncompiler.jsmitretechnical-description
- github.com/knex/knex/blob/3.3.0/lib/dialects/sqlite3/schema/sqlite-columncompiler.jsmitretechnical-description
- github.com/knex/knex/issues/4481mitreissue-tracking
News mentions
0No linked articles in our index yet.