CVE-2026-142191

7.5High

Published Dec 2, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

7.5CVSS

High

0CVSS v3.110

Attack vector
Network
Complexity
High
Privileges
Low
User action
None
Impact
Full C/I/A compromise
Weakness
CWE-89

What an attacker gets

Authenticated attackers can execute arbitrary T-SQL commands with database privileges. This requires the attacker to control the table or view names passed to schema builder methods.

Root cause

The MSSQL dialect fails to sanitize table or view names, allowing single quotes to break out of the object_id() literal in schema methods.

Affected versions

Knex through 3.3.0

CVSS v3.1 · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Fix & remediation

Upgrade to a version later than 3.3.0. Until then, strictly validate or whitelist any user-supplied input used as table or view names in schema operations.

remediation — bash
$ npm install knex@latest

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-142191

More fully triaged vulnerabilities you may want to check next.