@hypequery/clickhouse has SQL Injection in parameter escaping that allows arbitrary SQL execution
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| hypequery | hypequery | before 2.5.1 | 2.5.1 | Patch available | CNA |
| — | @hypequery/clickhouse (npm) | before 2.5.1 | 2.5.1 | Patch available | GHSA-6wcc-39rp-hh9p |
- hypequery Vendorhypequery Affected before 2.5.1 Fixed in 2.5.1 Patch available CNA
- @hypequery/clickhouse (npm) Vendor— Affected before 2.5.1 Fixed in 2.5.1 Patch available GHSA-6wcc-39rp-hh9p
Remediation
- Fix · CNA hypequery (hypequery) Fixed in 2.5.1
- Fix · GHSA-6wcc-39rp-hh9p @hypequery/clickhouse (npm) Fixed in 2.5.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-54658
- 2026-10-03 Alias added: GHSA-6wcc-39rp-hh9p
References
Other 9
- https://github.com/hypequery/hypequery/security/advisories/GHSA-6wcc-39rp-hh9p
- https://github.com/hypequery/hypequery/pull/349
- https://github.com/hypequery/hypequery/commit/2879161a810fed2c2222f785816ff05510976960
- https://github.com/hypequery/hypequery/commit/2dc1df7bae
- https://github.com/hypequery/hypequery/commit/4dfa9d77d70a08b970e722268b75ca7d13db0bdf
- https://github.com/hypequery/hypequery/blob/main/packages/clickhouse/CHANGELOG.md#202
- https://github.com/hypequery/hypequery/releases/tag/@hypequery/[email protected]
- https://github.com/hypequery/hypequery/releases/tag/@hypequery/[email protected]
- https://github.com/hypequery/hypequery
Sources
- CVE-2026-54658 · CVE Program
- CVE-2026-54658 · NVD
- FIRST EPSS
- GHSA-6wcc-39rp-hh9p · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences