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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.
Propose a mitigation on Community Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
References
- https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/index.js#L132-L138
- https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/schema/mssql-compiler.js#L10-L22
- https://www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-mssql-droptableifexists-dropviewifexists-and-createtableifnotexists
CWEs
CWE-89
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.