/

CVE-2026-19351

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in node-sql-query Request Handler

CVE-2026-19351

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access or manipulation

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity SQL injection vulnerability in node-sql-query can allow attacker-controlled request parameters to alter database queries. The issue becomes risky when values handled by the Request Parameter Handler reach SelectQuery.from or SelectQuery.build without reliable parameterization or input constraints.

Affected context

The vulnerability occurs in applications using affected node-sql-query releases where request-derived values are processed by the Request Parameter Handler and passed into the SelectQuery implementation in lib/Select.js. Risk depends on whether external input can reach these query-building functions and whether the resulting database account has access to sensitive data or modification capabilities.

Exploit preconditions

  • Attack surface: Application endpoints or services that construct queries through the Request Parameter Handler
  • Required access: Ability to submit or influence request parameters processed by the affected query-building path
  • Trigger point: Invocation of SelectQuery.from or SelectQuery.build
  • Why exploitation is possible: Attacker-controlled values may be incorporated into SQL query structure without sufficient parameterization or context-aware validation

Why this happens

The underlying bug is an unsafe boundary between externally influenced request parameters and SQL query construction. When input is treated as query syntax rather than as data bound through parameters, an attacker may influence the meaning of the generated statement. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

Potential impact

  • Sensitive database records may be disclosed
  • Database records may be modified or deleted
  • Authentication or authorization data may be compromised
  • Application behavior may be altered through manipulated query results
  • The database service may be used to affect connected systems, depending on privileges

General mitigation guidance

Mitigation generally focuses on ensuring that request data remains data throughout query construction.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for values
  • Restricting dynamic identifiers, operators, and sort expressions to explicit allowlists
  • Separating query structure from user-controlled values
  • Applying schema-based validation at request boundaries
  • Using database accounts with only the permissions required by the application
  • Avoiding direct concatenation or interpolation of request values into SQL text
  • Centralizing query construction so secure patterns are applied consistently

How teams detect issues like this

Organizations commonly detect SQL injection risks through:

  • Static analysis rules for string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed into query-builder methods
  • Dynamic testing with safe, non-destructive injection probes in controlled environments
  • Database activity monitoring for anomalous query structure, errors, or access patterns
  • Dependency and software composition analysis for affected library usage
  • Policy enforcement requiring parameterized database access APIs

Automated code review and security scanning tools may help identify unsafe query-building patterns early.

Sources

SourceLink
github.comgithub.com/dresende/node-sql-query/
github.comgithub.com/dresende/node-sql-query/commit/3414c42f6de89826fa1f5f36f6139d1e6552778e
github.comgithub.com/dresende/node-sql-query/pull/64
github.comgithub.com/dresende/node-sql-query/releases/tag/v0.1.29
github.comgithub.com/windhxy/CVE-my/issues/2
vuldb.comvuldb.com/cve/CVE-2026-19351
vuldb.comvuldb.com/submit/865884
vuldb.comvuldb.com/vuln/387190
vuldb.comvuldb.com/vuln/387190/cti

Frequently asked

questions

It can be remotely exploitable when an exposed application passes attacker-controlled request parameters into the affected query-building functions.

Authentication is deployment-dependent. An attacker needs access to a request path that reaches the vulnerable handler, whether that path is public or authenticated.

Use parameterized queries for data values and strict allowlists for any query elements that must be selected dynamically.

Enforce secure database-access patterns through code review, static analysis, request schema validation, least-privilege database accounts, and controlled security testing.

Find out what's already
exploitable in your codebase.