CVE-2026-142191
7.5HighPublished Dec 2, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite
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.
$ npm install knex@latestAI-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
- https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/index.js#L132-L138
- https://github.com/knex/knex/blob/3.3.0/lib/dialects/mssql/schema/mssql-compiler.js#L10-L22
- https://www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-mssql-droptableifexists-dropviewifexists-and-createtableifnotexists
Related Critical / High CVEs
More fully triaged vulnerabilities you may want to check next.
- CVE-2026-1421907.5HighAuthenticated attackers can execute arbitrary SQL commands or bypass database constraints. This requires the ability to supply input to the enu() column method in the application.
- CVE-2026-1421927.5HighAuthenticated attackers can execute arbitrary PL/SQL commands on your Oracle database. They need the ability to trigger the refreshMaterializedView function with crafted input.
- CVE-2026-1424417.5HighRemote attackers can bypass IP access control lists to reach protected services. This occurs because the filter fails to correctly evaluate nested network range rules.
- CVE-2026-1415177.8HighLocal attackers can escape a sandboxed workload to execute code as the invoking user. This requires the attacker to control a sandboxed workload and manipulate the containment helper during a launch rebuild.
- CVE-2026-1043757.1HighAttackers can execute arbitrary JavaScript in users' browsers by exploiting the polyfill.io supply chain compromise. This requires a user to visit the affected demo page.
- CVE-2026-54328.1HighAdjacent attackers can crash Honeywell controllers or cause data integrity issues. This requires network access to the control network.