Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Node.js app using node-sql-query 0.1.25-0.1.28
-
DeliverySend HTTP request with malicious joinType payload
-
ExploitLibrary interpolates joinType into SQL JOIN clause without validation
-
ExecutionDatabase executes injected SQL
-
ImpactAttacker 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-54919
GHSA-9hgm-6p57-h656
NVD
CVE.org
EPSS
VulDB
Exploit-DB