{"id":"CVE-2026-142191","aliases":["EUVD-2026-141514","GHSA-xp5q-36vg-8c47"],"status":"published","title":"Knex through 3.3.0 SQL Injection via MSSQL dropTableIfExists, dropViewIfExists and createTableIfNotExists","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.","severity":{"version":"4.0","score":7.7,"vector":"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","level":"high","assessor":"cna","from":"cve","others":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},{"version":"4.0","score":7.7,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","from":"ghsa"}]},"epss":{"day":"2026-12-04","score":0.00564,"percentile":0.48316,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-89"],"published":"2026-12-02T16:50:59Z","modified":"2026-12-04T20:46:00Z","products":[{"vendor":"@mikro-orm","product":"knex"},{"vendor":"knex","product":"knex"}],"references":[{"url":"https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/schema/mssql-compiler.js#L10-L22","tags":["technical-description","article"]},{"url":"https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/index.js#L132-L138","tags":["technical-description","article"]},{"url":"https://www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-mssql-droptableifexists-dropviewifexists-and-createtableifnotexists","tags":["third-party-advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142191","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-xp5q-36vg-8c47"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142191.json","tags":["advisory"]},{"url":"https://github.com/knex/knex","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-142191","title":"Knex through 3.3.0 SQL Injection via MSSQL dropTableIfExists, dropViewIfExists and createTableIfNotExists","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.","status":"published","published":"2026-12-02T16:50:59.48Z","modified":"2026-12-03T14:55:43.801Z","cvss":[{"version":"4.0","score":7.7,"vector":"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","level":"high","assessor":"cna"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-89"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","date":"2026-12-03"},"updated_at":"2026-12-03T15:01:47.920803Z"}],"euvd":[{"id":"EUVD-2026-141514","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.","status":"published","published":"2026-12-02T16:50:59Z","modified":"2026-12-03T14:55:43Z","cvss":[{"version":"4.0","score":7.7,"vector":"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","level":"high"}],"updated_at":"2026-12-02T21:27:22.841078Z"}],"ghsa":[{"id":"GHSA-xp5q-36vg-8c47","title":"Knex through 3.3.0 contains an sql injection vulnerability in the MSSQL dialect that allows...","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.","status":"published","published":"2026-12-02T18:31:44Z","modified":"2026-12-02T18:31:49Z","cvss":[{"version":"4.0","score":7.7,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-12-02T18:38:43.855074Z"}],"nvd":[{"id":"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.","status":"published","published":"2026-12-02T17:17:40.207Z","modified":"2026-12-04T16:29:40.94Z","cvss":[{"version":"4.0","score":7.7,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-89"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","date":"2026-12-03"},"updated_at":"2026-12-03T15:17:27.288122Z"}],"osv":[{"id":"CVE-2026-142191","title":"Knex through 3.3.0 SQL Injection via MSSQL dropTableIfExists, dropViewIfExists and createTableIfNotExists","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.","status":"published","published":"2026-12-02T16:50:59.48Z","modified":"2026-12-04T20:46:00.0912856Z","cvss":[{"version":"4.0","score":7.7,"vector":"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","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-12-03T21:10:05.302032Z"}]}}
