AploSec / Disclosures / CVE-2026-142190
Knex through 3.3.0 SQL Injection via unescaped enu() schema builder values
CVE-2026-142190 · published 2026-12-02
In plain words: this type of bug lets someone change the queries sent to the database (SQL injection). No fixed release is listed yet.
Summary
CVE-2026-142190 affects knex (npm) <= 3.3.0: SQL Injection via unescaped enu() schema builder values (CWE-89). No fixed release is listed. CVSS 4.0 base score 7.7 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).
Knex through 3.3.0 contains an sql injection vulnerability that allows attackers to inject SQL into DDL statements by supplying enum values containing single quotes to the enu() column method. Attackers can terminate the literal to neutralize SQLite CHECK constraints or execute stacked statements like DROP TABLE on PostgreSQL with the database connection's privileges.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
No fixed release is listed in the advisory. Check the references for upstream status.
References
- Referencehttps://github.com/knex/knex/issues/4481
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-unescaped-enu-schema-builder-values
- Vulnerable codehttps://github.com/knex/knex/blob/3.3.0/lib/dialects/mysql/schema/mysql-columncompiler.js#L63-L65
- Vulnerable codehttps://github.com/knex/knex/blob/3.3.0/lib/dialects/postgres/schema/pg-columncompiler.js#L25-L48
- Vulnerable codehttps://github.com/knex/knex/blob/3.3.0/lib/dialects/sqlite3/schema/sqlite-columncompiler.js#L16-L20
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142190
- Severity
- High 7.7CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- knex
- Ecosystem
- npm
- Affected
- <= 3.3.0
- Fixed
- None
- Weakness
- CWE-89
- CNA
- VulnCheck
- Credit
- Zachariah Mithani (AploSec)finder