Unrated severityNVD Advisory· Published Dec 2, 2026
Knex through 3.3.0 SQL Injection via MSSQL dropTableIfExists, dropViewIfExists and createTableIfNotExists
CVE-2026-142191
Description
Knex through 3.3.0 contains an sql injection vulnerability in the MSSQL dialect that allows attackers to inject T-SQL via table or view names. Attackers can supply names containing a single quote to close the object_id() literal in dropTableIfExists, dropViewIfExists, or createTableIfNotExists and execute arbitrary T-SQL with the database connection's privileges.
Patches
Vulnerability mechanics
References
3- www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-mssql-droptableifexists-dropviewifexists-and-createtableifnotexistsmitrethird-party-advisory
- github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/index.jsmitretechnical-description
- github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/schema/mssql-compiler.jsmitretechnical-description
News mentions
0No linked articles in our index yet.