Skip to main content

node-sql-query EUVDEUVD-2026-54919

| CVE-2026-19351 MEDIUM
SQL Injection (CWE-89)
2026-08-09 VulDB GHSA-9hgm-6p57-h656
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Identify Node.js app using node-sql-query 0.1.25-0.1.28
  2. Delivery
    Send HTTP request with malicious joinType payload
  3. Exploit
    Library interpolates joinType into SQL JOIN clause without validation
  4. Execution
    Database executes injected SQL
  5. Impact
    Attacker extracts or modifies database records

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

Exploitation requires that the target application passes user-controlled data as the joinType option to SelectQuery.from() in node-sql-query versions 0.1.25-0.1.28 - for example, code like SelectQuery.from(table, col1, col2, { joinType: req.query.joinType }). If joinType values are developer-hardcoded in the application, the library version is irrelevant and the vulnerability is not exploitable. The CVSS 4.0 PR:N assignment indicates no authentication is required at the library level, but authentication requirements are ultimately determined by the consuming application's access controls. Exploitation is constrained to the JOIN clause context, limiting the injection surface compared to WHERE-clause injection; UNION-based extraction is the most likely payload class. No special platform or OS configuration is required beyond a running Node.js application using the affected library versions.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P) yields a score of 6.9, reflecting remote, low-complexity, unauthenticated exploitation with low impact across all three CIA axes and a publicly available exploit. However, the real-world exploitability of this vulnerability is conditional on how the consuming application is coded: exploitation requires that user-supplied data flows into the joinType option of SelectQuery.from() without prior sanitization - a specific and non-default application-level pattern. Applications that hardcode join types are entirely unaffected regardless of library version. No EPSS score was provided in the input data; none can be cited. The absence of a CISA KEV entry suggests no observed mass or targeted exploitation at time of analysis. The E:P exploit maturity is consistent with the referenced GitHub issue containing a working payload. Overall, this is a genuine vulnerability in the library but a medium-priority remediation concern in practice, because actual exploitation depends on an additional application-level code quality gap.

Exploit ScenarioDerived

An attacker targets a Node.js web application that accepts a user-supplied join type parameter and passes it directly to SelectQuery.from() using node-sql-query 0.1.25-0.1.28. By sending an HTTP request with a crafted joinType value such as INNER JOIN users ON 1=1 UNION SELECT username,password,null FROM users --, the library interpolates the payload verbatim into the SQL query, causing the database to return data from an unintended table. A public exploit demonstrating this technique is available at https://github.com/windhxy/CVE-my/issues/2.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 09, 2026

SQL injection in dresende/node-sql-query versions 0.1.25-0.1.28 allows attackers who can influence the joinType option passed to SelectQuery.from() to inject arbitrary SQL into JOIN clauses, because the joinType string was interpolated directly into the query without any allowlist validation. Applications built on this Node.js SQL query-builder library that pass user-controlled input to the joinType parameter are exploitable remotely with no authentication (per the CVSS 4.0 AV:N/PR:N vector). A publicly available exploit exists per the E:P maturity flag and referenced GitHub issue; no confirmed active exploitation (not in CISA KEV). A vendor-released patch is available as v0.1.29.

RemediationAI

Upgrade node-sql-query to v0.1.29, the vendor-released patched version. The fix is delivered via commit 3414c42f6de89826fa1f5f36f6139d1e6552778e and is available as a tagged release at https://github.com/dresende/node-sql-query/releases/tag/v0.1.29 and merged via pull request at https://github.com/dresende/node-sql-query/pull/64. As a compensating control prior to upgrading, applications should validate the joinType value against an explicit allowlist (INNER, LEFT, LEFT OUTER, RIGHT, RIGHT OUTER, FULL, FULL OUTER) before passing it to SelectQuery.from(); this can be done at the application layer with minimal trade-offs, though it places the burden of sanitization on consumer code rather than the library. Do not pass unsanitized request parameters to joinType under any circumstances.

Affected VersionsENISA

node-sql-query 0.1.26
node-sql-query 0.1.25
node-sql-query 0.1.27
node-sql-query 0.1.28

Affected Packages

euvd node_sql_query 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

node-sql-query (cpe:2.3:a:dresende:node-sql-query) is a Node.js library for programmatically building SQL SELECT, INSERT, UPDATE, and DELETE queries. The vulnerable code path is in lib/Select.js within the SelectQuery.from() and SelectQuery.build() functions. Prior to v0.1.29, the joinType option was taken from caller-supplied options and pushed directly into the SQL query string via query.push(from.opts.joinType.toUpperCase()) with no validation - a textbook CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) defect. The patch at commit 3414c42f introduces an explicit allowlist object (allowed_join_types) covering INNER, LEFT, LEFT OUTER, RIGHT, RIGHT OUTER, FULL, and FULL OUTER; any value not in that map throws an Error before query construction proceeds. The PR diff also corrects invalid SQL in the documentation (LEFT INNER is not a valid ANSI JOIN type; the fix replaces it with LEFT OUTER throughout tests and README).

Know when Node Sql Query 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 (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 6.5 MEDIUM

Network-reachable injection with no required auth if endpoint is public; availability impact omitted as JOIN injection primarily enables data read/write, not denial of service.

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

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

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

Lifecycle Timeline

2
CVSS changed
Aug 09, 2026 - 12:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
CVE Published
Aug 09, 2026 - 11:30 cve.org
MEDIUM 6.9

DescriptionCVE.org

A vulnerability was found in dresende node-sql-query 0.1.25/0.1.26/0.1.27/0.1.28. Affected by this vulnerability is the function SelectQuery.from/SelectQuery.build in the library lib/Select.js of the component Request Parameter Handler. Performing a manipulation results in sql injection. It is possible to initiate the attack remotely. The exploit has been made public and could be used. Upgrading to version 0.1.29 addresses this issue. The patch is named 3414c42f6de89826fa1f5f36f6139d1e6552778e. Upgrading the affected component is recommended.

Threat Intelligence Overview

EPSS Score
0.5%
Top 60% exploitable
Prevalence
Low
niche Node.js SQL query builder, limited npm ecosystem adoption
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +28
PoC: +20
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