npm
CVE-2026-142191
Knex through 3.3.0 SQL Injection via MSSQL dropTableIfExists, dropViewIfExists and createTableIfNotExists
- Severity
- High 7.7
- Published
- 2 Dec 2026
- Last changed
- 2 Dec 2026
- Added to UpHeron
- 2 Dec 2026
- Weakness
- SQL injection (CWE-89)
- Attack
- Over the network · Only under certain conditions · Needs a user account · No user action needed
- Attacker can
- Read data · Change data · Take it down
- CVSS 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- Sources
- CVE Program
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.
Affected software
| Software | Affected versions |
|---|---|
knexnpm · osv:npm:knex |
|
About knex
- Weekly downloads (npm)
- 6,603,894npm, 2 Dec 2026
Vulnerabilities in knex
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 0
- High, last 12 months
- 3
- Known exploited
- 0
- CVE-2026-142190Knex through 3.3.0 SQL Injection via unescaped enu() schema builder valuesHigh 7.7 2 Dec 2026
- CVE-2026-142192Knex through 3.3.0 SQL Injection via Oracle refreshMaterializedView View NameHigh 7.7 2 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-142191