CVE-2026-142191 — knex
One of 3 knex vulnerabilities published together by NVD: our article covers all of them.
WebDatabasesVulnerabilitiesSummary
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 breakdown
High · 7.7
An attacker with a normal user account can exploit this over the network, without any user action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- high (only works under specific conditions)
- Special conditions
- only in some setups or conditions
- Login needed
- yes, a normal user account
- User action needed
- no
- Impact
- high on confidentiality, integrity and availability
- Impact on other systems
- none
Weakness
- CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| knex | ≤ 3.3.0 | — |
References by type
Other references
Affected
- knex
What to do
- Check whether you run an affected product or version and apply the vendor's update or mitigation.
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-142191?
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 objectid() literal in dropTableIfExists, dropViewIfExists, or createTableIfNotExists and execute arbitrary T-SQL with the database connection's privileges. Weakness type: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (CWE-89).
How severe is CVE-2026-142191?
CVE-2026-142191 has a CVSS 4.0 base score of 7.7 (high), from the CNA (vulncheck.com). An attacker with a normal user account can exploit this over the network, without any user action, but only under specific conditions.
Is CVE-2026-142191 being exploited?
Not as far as is known: CVE-2026-142191 is not in CISA's Known Exploited Vulnerabilities catalog as of December 2, 2026.
Which versions are affected by CVE-2026-142191?
knex ≤ 3.3.0.
How do I fix CVE-2026-142191?
Follow the advisories and patches linked on this page under References for fixed versions and workarounds.