All vulnerabilities

npm

CVE-2026-142190

Knex through 3.3.0 SQL Injection via unescaped enu() schema builder values

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

From the CVE Program.

Affected software

SoftwareAffected versions
knexnpm · osv:npm:knex
  • Every version up to 3.3.0

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
Search the list for knex

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-142190