@hypequery/clickhouse has SQL Injection in parameter escaping that allows arbitrary SQL execution (CVE-2026-54658)
@hypequery/clickhouse versions prior to 2.0.2 contain a SQL injection vulnerability in the escapeValue() function used for parameter substitution. This flaw allows attackers controlling parameter values to inject arbitrary SQL by exploiting improper escaping of trailing backslashes before closing quotes. The issue is fixed in version 2.0.2, which correctly escapes backslashes before single quotes. No workaround other than upgrading is recommended.
AI Analysis
Technical Summary
A critical SQL injection vulnerability (CVE-2026-54658) exists in the @hypequery/clickhouse library's escapeValue() function. The vulnerability arises because the function fails to properly escape backslashes before escaping single quotes, enabling attackers who control query parameters to inject arbitrary SQL code by using a trailing backslash to escape the closing quote. This affects all versions prior to 2.0.2. The vendor fixed the issue in version 2.0.2 by correcting the escaping logic. No alternative mitigations are advised, making upgrading the only effective remediation.
Potential Impact
Successful exploitation allows an unauthenticated attacker who can supply parameter values to execute arbitrary SQL commands on the backend database. This can lead to full compromise of data confidentiality, integrity, and availability within the affected system. The vulnerability is critical due to its ease of exploitation (network attack vector, no privileges or user interaction required) and the high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to @hypequery/clickhouse version 2.0.2 or later, where the vulnerability is fixed by properly escaping backslashes before single quotes in the escapeValue() function. No other workarounds or manual input sanitization are recommended or effective.
@hypequery/clickhouse has SQL Injection in parameter escaping that allows arbitrary SQL execution (CVE-2026-54658)
Description
@hypequery/clickhouse versions prior to 2.0.2 contain a SQL injection vulnerability in the escapeValue() function used for parameter substitution. This flaw allows attackers controlling parameter values to inject arbitrary SQL by exploiting improper escaping of trailing backslashes before closing quotes. The issue is fixed in version 2.0.2, which correctly escapes backslashes before single quotes. No workaround other than upgrading is recommended.
CVSS v3.1
Score 9.8critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
A critical SQL injection vulnerability (CVE-2026-54658) exists in the @hypequery/clickhouse library's escapeValue() function. The vulnerability arises because the function fails to properly escape backslashes before escaping single quotes, enabling attackers who control query parameters to inject arbitrary SQL code by using a trailing backslash to escape the closing quote. This affects all versions prior to 2.0.2. The vendor fixed the issue in version 2.0.2 by correcting the escaping logic. No alternative mitigations are advised, making upgrading the only effective remediation.
Potential Impact
Successful exploitation allows an unauthenticated attacker who can supply parameter values to execute arbitrary SQL commands on the backend database. This can lead to full compromise of data confidentiality, integrity, and availability within the affected system. The vulnerability is critical due to its ease of exploitation (network attack vector, no privileges or user interaction required) and the high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to @hypequery/clickhouse version 2.0.2 or later, where the vulnerability is fixed by properly escaping backslashes before single quotes in the escapeValue() function. No other workarounds or manual input sanitization are recommended or effective.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6wcc-39rp-hh9p
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54658"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 3.1
Threat ID: 6a6940199c2644c7f8669257
Added to database: 07/28/2026, 23:49:45 UTC
Last enriched: 07/29/2026, 12:38:17 UTC
Last updated: 09/11/2026, 22:06:34 UTC
Views: 66
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.