Description
Hypequery is a TypeScript semantic layer for ClickHouse. Prior to 2.5.1, escapeValue() in packages/clickhouse/src/core/utils.ts did not escape backslashes before single quotes during parameter substitution, allowing attacker controlled query parameters with a trailing backslash to escape the closing quote and inject arbitrary SQL. This issue is fixed in version 2.0.2. Version 2.0.2 fixes string parameters, while version 2.5.1 fixes all known vectors. Upgrading to 2.5.1 or later is the only complete fix. In versions 2.0.2 through 2.5.0, serializing non-scalar parameters with  JSON.stringify()  before passing them is a workaround for the object/array vector only.
Published: 2026-07-28
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Prior to version 2.5.1, the escapeValue() function in Hypequery’s ClickHouse module failed to escape backslashes that immediately precede single quotes when performing parameter substitution. An attacker who can supply a query parameter that ends with a backslash can escape the closing quote and inject arbitrary SQL into the ClickHouse query. This allows the execution of read, update, delete, or other data‑manipulation operations on the ClickHouse database, compromising the confidentiality, integrity, and availability of the stored data. The vulnerability is a classic SQL injection flaw, identified as CWE‑89, and is scored with a CVSS of 9.8.

Affected Systems

The vulnerability affects the @hypequery/clickhouse package, published by hypequery. All releases before 2.0.2 are vulnerable. Version 2.0.2 partially mitigates string‑parameter injections but still allows non‑scalar parameters to be exploited. Deployments using versions 2.0.2 through 2.5.0 should apply the JSON.stringify() workaround for non‑scalar parameters. The complete fix is incorporated in version 2.5.1 and later. Users on vulnerable versions should verify the installed package and plan an upgrade accordingly.

Risk and Exploitability

The CVSS score remains high at 9.8. Although the EPSS score is below 1% and the vulnerability is not listed in KEV, the risk to systems still running before 2.5.1 is significant. Attackers would need to supply malicious parameters to the ClickHouse query layer, which can be achieved from any component that accepts user input. Upgrading to 2.5.1 or later eliminates the flaw; until then, the partial patch in 2.0.2 and the JSON.stringify() workaround only protect against string parameter injection, leaving non‑scalar vectors exposed.

Generated by OpenCVE AI on August 4, 2026 at 23:18 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update @hypequery/clickhouse to version 2.5.1 or later, which supplies full escaping of backslashes before quotes.
  • For deployments using versions 2.0.2 through 2.5.0 that cannot be upgraded immediately, serialize non‑scalar parameters with JSON.stringify() before passing them to avoid injection via object or array parameters.
  • Validate or sanitize all input parameters to ensure backslash‑quote sequences are not accepted, as a temporary precaution if an upgrade is delayed.
  • Restrict database permissions for the ClickHouse user to limit the damage potential of any injected SQL statements.

Generated by OpenCVE AI on August 4, 2026 at 23:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6wcc-39rp-hh9p @hypequery/clickhouse has SQL Injection in parameter escaping that allows arbitrary SQL execution
History

Tue, 04 Aug 2026 20:45:00 +0000

Type Values Removed Values Added
Description Hypequery is a TypeScript semantic layer for ClickHouse. Prior to 2.0.2, escapeValue() in packages/clickhouse/src/core/utils.ts did not escape backslashes before single quotes during parameter substitution, allowing attacker controlled query parameters with a trailing backslash to escape the closing quote and inject arbitrary SQL. This issue is fixed in version 2.0.2. Hypequery is a TypeScript semantic layer for ClickHouse. Prior to 2.5.1, escapeValue() in packages/clickhouse/src/core/utils.ts did not escape backslashes before single quotes during parameter substitution, allowing attacker controlled query parameters with a trailing backslash to escape the closing quote and inject arbitrary SQL. This issue is fixed in version 2.0.2. Version 2.0.2 fixes string parameters, while version 2.5.1 fixes all known vectors. Upgrading to 2.5.1 or later is the only complete fix. In versions 2.0.2 through 2.5.0, serializing non-scalar parameters with  JSON.stringify()  before passing them is a workaround for the object/array vector only.
References

Wed, 29 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Hypequery
Hypequery hypequery
Vendors & Products Hypequery
Hypequery hypequery

Wed, 29 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Description Hypequery is a TypeScript semantic layer for ClickHouse. Prior to 2.0.2, escapeValue() in packages/clickhouse/src/core/utils.ts did not escape backslashes before single quotes during parameter substitution, allowing attacker controlled query parameters with a trailing backslash to escape the closing quote and inject arbitrary SQL. This issue is fixed in version 2.0.2.
Title @hypequery/clickhouse has SQL Injection in parameter escaping that allows arbitrary SQL execution
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Hypequery Hypequery
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-04T20:39:44.798Z

Reserved: 2026-06-15T20:16:46.199Z

Link: CVE-2026-54658

cve-icon Vulnrichment

Updated: 2026-07-29T12:31:48.514Z

cve-icon NVD

Status : Deferred

Published: 2026-07-28T23:17:08.913

Modified: 2026-08-04T21:16:36.853

Link: CVE-2026-54658

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T23:30:15Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')