Skip to main content

Knex.js CVE-2026-142192

| EUVDEUVD-2026-141513 HIGH
SQL Injection (CWE-89)
2026-12-02 VulnCheck GHSA-2r8w-m64v-76m4
7.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to vulnerable application
  2. Delivery
    Supply crafted view/schema name
  3. Exploit
    Close REFRESH literal with single quote
  4. Execution
    Execute injected PL/SQL via DBMS_MVIEW
  5. Impact
    Read or destroy Oracle data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The application must use Knex's Oracle dialect and invoke refreshMaterializedView() with attacker-influenced view or schema name values; a single quote closes the DBMS_MVIEW.REFRESH literal and injected PL/SQL then runs with the database connection's privileges. Limiting factors that reduce real-world exposure: the Oracle dialect specifically must be in use (MySQL/Postgres/SQLite paths are unaffected), the application must pass untrusted input into the view/schema name argument (not a default or common coding pattern), and per the CVSS 4.0 vector exploitation requires low-level privileges (PR:L) plus a present attack requirement (AT:P). Applications that do not expose this method to untrusted input are not exploitable.

Impact

This is a genuine but conditional priority rather than a drop-everything emergency. Signals: CVSS 4.0 base 7.7 (High) with AV:N/AC:H/AT:P/PR:L/UI:N and full VC:H/VI:H/VA:H impact; vuln.today decision label 'this_week'; reported by VulnCheck with a vendor advisory and a direct source-code pointer. No CISA KEV entry, no EPSS score, and no confirmed public exploit are present in the provided data, so there is no evidence of active or at-scale exploitation. The vector itself tempers the raw severity: AC:H and AT:P indicate the attack is not a trivial default-config hit, and PR:L means some level of access is required. The true risk gate is not the CVSS number but usage - the flaw only matters where an application uses Knex's Oracle dialect AND feeds untrusted input into refreshMaterializedView() view/schema names. Conflict/gap to note: no fixed version is listed in the available sources, and EPSS/KEV are both absent, so prioritization rests on the vendor advisory and the 'this_week' label rather than exploitation telemetry.

Exploit ScenarioDerived

An attacker who can influence the view or schema name passed to Knex's Oracle refreshMaterializedView() supplies a value containing a single quote to close the DBMS_MVIEW.REFRESH string literal and appends arbitrary PL/SQL, which runs with the database connection's privileges. In a realistic deployment, an application endpoint that lets a low-privileged user specify a materialized view to refresh becomes a PL/SQL injection point, enabling data theft, modification, or destruction. No confirmed public exploit code is provided; the VulnCheck advisory and the linked source location describe the flaw but are not verified working exploits.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

SQL injection in the Oracle dialect of the Knex.js query builder, affecting versions through 3.3.0, lets an attacker who can influence the view or schema name passed to refreshMaterializedView() break out of the DBMS_MVIEW.REFRESH string literal with a single quote and append arbitrary PL/SQL that executes with the database connection's privileges. Exploitation is conditional rather than universal: the application must be using the Oracle dialect specifically (MySQL, PostgreSQL and SQLite code paths are unaffected), must call this schema-building method, and must feed it untrusted input - the CVSS 4.0 vector rates the attack complex and requires low-level privileges (AC:H, AT:P, PR:L), and the independent assessment reaches the same conditional conclusion for a CVSS 3.1 score of 7.7. No public exploit code has been identified at time of analysis and the issue is not in CISA KEV; priority is 'this_week' rather than emergency response.

RemediationAI

Upgrade Knex.js to a release later than 3.3.0 as directed by the VulnCheck advisory (https://www.vulncheck.com/advisories/knex-through-3.3.0-sql-injection-via-oracle-refreshmaterializedview-view-name), which is the only complete fix; the supplied data does not enumerate an exact fixed version number, so confirm the patched release against the advisory or the upstream repository before closing out. Where an immediate upgrade is not possible, stop passing untrusted data into the view or schema name argument of refreshMaterializedView() and resolve identifiers against a fixed allowlist of known materialized view/schema names before the call - the trade-off is that dynamically generated or per-tenant view names will no longer work without registration. In parallel, run the Oracle connection used by Knex under a least-privileged account, since any injected PL/SQL inherits that account's rights; the trade-off is that schema-migration workloads that legitimately need DDL or EXECUTE privileges on DBMS_MVIEW may require a separate, non-exposed credential. Applications not using the Oracle dialect need no code change.

Affected VersionsENISA

knex 0 ≤3.3.0

Affected Packages

euvd knex no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Knex.js is a Node.js SQL query builder that abstracts dialect-specific SQL generation; its Oracle schema compiler constructs a call to the built-in DBMS_MVIEW.REFRESH package to refresh materialized views. Per the linked source reference (lib/dialects/oracle/schema/oracle-compiler.js, lines 107-113 in the 3.3.0 tree), the view and schema identifiers are concatenated into the refresh call as a quoted literal instead of being bound as parameters or validated as identifiers, which is the classic CWE-89 improper neutralization of special elements in SQL. Because the injected text lands inside a PL/SQL block executed by the database rather than in a plain SELECT, a single quote suffices to terminate the literal and append arbitrary PL/SQL statements - and those statements inherit the privileges of the connection Knex is using, so the blast radius is bounded by that account's rights (a highly privileged migration/schema account materially raises impact). The CPE cpe:2.3:a:knex:knex:*:*:*:*:*:*:*:* is a wildcard with no version constraints, so exposure must be scoped by the advisory's 'through 3.3.0' statement and by whether the Oracle dialect is actually in use.

Know when Knex gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 7.7 HIGH
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
vuln.today AI 7.5 HIGH

Reachable over the network but requires the non-default pattern of passing untrusted view/schema names to the Oracle-only method (AC:H) with low app privileges (PR:L); injected PL/SQL yields full DB read/write/destroy (C/I/A:H).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Knex through 3.3.0 contains an sql injection vulnerability in the Oracle dialect refreshMaterializedView() that allows attackers to inject PL/SQL by supplying crafted view or schema names. Attackers can include a single quote to close the DBMS_MVIEW.REFRESH literal and append arbitrary PL/SQL statements that run with the database connection's privileges.

Executive ViewAI

Why It Matters

CVE-2026-142192 is a high-severity SQL injection in Knex.js's Oracle dialect that could allow an attacker to execute arbitrary database commands with the application's privileges. Only applications using the Oracle adapter and passing untrusted input to refreshMaterializedView() are exposed, limiting impact to a subset of database-backed services. Leadership should prioritize remediation this week, as exploitation requires specific conditions and no active exploitation has been observed.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include strictly validating and allowlisting all schema and view names passed to refreshMaterializedView(), ensuring that untrusted input cannot reach this method, using least-privilege database accounts for the application connection, and monitoring database activity for unexpected PL/SQL execution.

Threat Intelligence Overview

Prevalence
Medium
popular Node.js query builder, but only Oracle-dialect users are affected
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy