CVE-2026-142190: Knex through 3.3.0 SQL Injection via unescaped enu() schema builder values

Published Dec 2, 2026
·
Updated

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.

Affected Software

1 affected component
npm/knex<=3.3.0

Event History

Dec 2, 2026
CVE Published
via MITRE·04:51 PM
Data Sourced
via MITRE·04:51 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What attacker-controlled data must reach the application to exploit this issue?

An attacker must be able to supply enum values that are passed to Knex's enu() schema-builder column method. Values containing single quotes can terminate the generated SQL literal.

2

How does impact differ by database backend?

On SQLite, injected SQL can neutralize CHECK constraints. On PostgreSQL, the issue can permit stacked statements, including statements such as DROP TABLE.

3

What permissions could injected SQL have?

Injected SQL executes with the privileges of the database connection used by the application. The resulting impact therefore depends on the permissions granted to that connection.

4

Which Knex versions should be reviewed?

Knex versions through 3.3.0 are identified as affected. Review schema-generation paths that pass externally influenced values to enu().

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203