CVE-2026-65980

Chartbrew: SQL Injection via Missing Backslash Escaping in ClickHouse Variable Substitution

Published Sep 21, 2026 CVSS 4.0 · 7.9 High EPSS < 1% KEV · Not listed
Description
Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. Prior to 5.2.3, Chartbrew's ClickHouse protocol in server/sources/plugins/clickhouse/clickhouse.protocol.js calls applySqlVariables() from server/sources/shared/sql/sql.variables.js without enabling the escapeBackslash option. For a ClickHouse-backed chart with variable binding, an attacker can supply a backslash before a quote so quote doubling does not keep the value within its intended SQL string literal. Public dashboards can expose this path without authentication, and successful exploitation can execute arbitrary ClickHouse SQL to disclose data or, when the database configuration permits, access files or internal network resources. This issue is fixed in version 5.2.3.

Analysis

AI-generated

Technical impact

A flaw in the ClickHouse protocol handling within Chartbrew allows an attacker to supply a backslash immediately before a quotation mark in a variable value. Because the escapeBackslash option is not enabled, the backslash is removed before the string is interpolated, turning the quote into part of the SQL command. This omission creates a classic SQL injection vulnerability (CWE‑89) that permits an attacker to execute arbitrary ClickHouse SQL statements. Successful exploitation can leak sensitive database contents or, if the ClickHouse server allows, read files or explore internal network resources.

Affected Systems

The vulnerability exists in the Chartbrew application, affecting any instance that has a version earlier than 5.2.3. No other vendors or product lines are reported to be affected.

Risk and Exploitability

The CVSS score of 7.9 reflects a high severity for a data‑exposure flaw. EPSS is not available and the issue is not listed in CISA’s KEV catalog. Public dashboards can be accessed without authentication, so the attack vector is unauthenticated remote access. An attacker would craft a malicious variable value in a dashboard that is served to visitors, causing the ClickHouse engine to execute the injected SQL.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Chartbrew to version 5.2.3 or later, which enables proper backslash escaping for ClickHouse variable substitution.
  • If an upgrade is infeasible, ensure that public dashboards using ClickHouse variable substitution are disabled or removed to block unauthenticated injection attempts.
  • Reconfigure the ClickHouse server to restrict file system access and network resource privileges, limiting the impact if injection succeeds.

Generated by OpenCVE AI on September 21, 2026 at 23:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Chartbrew
Chartbrew chartbrew
Vendors & Products Chartbrew
Chartbrew chartbrew
Type Values Removed Values Added
Description Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. Prior to 5.2.3, Chartbrew's ClickHouse protocol in server/sources/plugins/clickhouse/clickhouse.protocol.js calls applySqlVariables() from server/sources/shared/sql/sql.variables.js without enabling the escapeBackslash option. For a ClickHouse-backed chart with variable binding, an attacker can supply a backslash before a quote so quote doubling does not keep the value within its intended SQL string literal. Public dashboards can expose this path without authentication, and successful exploitation can execute arbitrary ClickHouse SQL to disclose data or, when the database configuration permits, access files or internal network resources. This issue is fixed in version 5.2.3.
Title Chartbrew: SQL Injection via Missing Backslash Escaping in ClickHouse Variable Substitution
Weaknesses CWE-89
References
Metrics cvssV4_0

{'score': 7.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H'}

Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 28, 2026, 8:17 PM
Reserved
Jul 23, 2026, 6:54 PM
Status
Deferred
Published
Sep 21, 2026, 10:16 PM
Modified
Sep 28, 2026, 9:17 PM