CVE-2026-142191: Vulnerability in Knex
Patch soon. 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.
CWE-89
- Exploitation
- None confirmed
- Severity
- 7.5 of 10
- Attack likelihood
- Unknown
- Fix
- None recorded
- Patch deadline
- No deadline set
Details
- Advisory ID
- GHSA-xp5q-36vg-8c47
- Vector
- CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weakness
- CWE-89
- Published
- 2 Dec 2026
- Last change
- 4 Dec 2026
Affected products
Affected versions and the first fixed release
- Knex Through 3.3.0. No fixed version recorded
- @mikro-orm Knex Version 0 ≤3.3.0. No fixed version recorded
Advisories
Vendor and security advisories
- github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/schema/mssql-compiler.js
- github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/index.js
- vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-mssql-droptableifexists-d...
Related
- Knex vulnerabilities Recent advisories, watch this product
- Knex vulnerabilities Recent advisories, watch this product