Skip to main content

Chartbrew EUVDEUVD-2026-84212

| CVE-2026-61852 MEDIUM
SQL Injection (CWE-89)
2026-09-21 GitHub_M
5.8
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to Chartbrew as team user
  2. Delivery
    Craft prompt influencing AI runQuery tool
  3. Exploit
    Model emits malicious non-integer row_limit
  4. Execution
    Value interpolated into LIMIT past read-only check
  5. Persist
    Arbitrary SQL runs on connected database
  6. Impact
    Read/alter data or reach OS

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated Chartbrew user (PR:L) with access to the AI orchestrator query feature, and a data source of type postgres, mysql, or clickhouse (the only source types where the vulnerable LIMIT-clause interpolation in runQuery.js is applied). The decisive limiting factor is AT:P: the attacker cannot supply row_limit directly - they must influence a MODEL-GENERATED non-integer row_limit, so exploitation hinges on manipulating the LLM into emitting a crafted value that gets appended into the SQL after the read-only keyword check. Escalation beyond data read/write to file access or OS command execution is further gated on the connected database account's permissions. Fixed in v5.2.2; deployments on that version or without the AI query tool enabled are not exposed.

Impact

This is a moderate, conditionally-exploitable SQL injection (CWE-89) rather than a drop-everything priority. The vendor CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N, score 5.8) tells a nuanced story: network-reachable and low attack complexity, but AT:P (attack requirements present) and PR:L (authenticated) meaningfully gate it. Critically, the vector rates the vulnerable system's own C/I/A as N while placing all impact on the SUBSEQUENT system (SC:H/SI:H/SA:H) - meaning Chartbrew itself is not directly compromised, but the connected backend database is, which is the true prize. The AT:P requirement is important and easy to overlook: exploitation depends on an authenticated user influencing a MODEL-GENERATED non-integer row_limit value flowing through the AI orchestrator (server/modules/ai/orchestrator/tools/runQuery.js), so the attacker does not directly control the injected value - they must steer the LLM into emitting a malicious row_limit that is then interpolated into the SQL LIMIT clause after the read-only keyword check has already run. No EPSS score, no CISA KEV listing, and no public exploit were provided in the intelligence; per precision rules this is 'no public exploit identified at time of analysis.' The one strong signal is a confirmed vendor fix (v5.2.2, commit 8c8412ed, GHSA-4923-m569-jc42) that adds integer validation, a LIMIT-clause check, and a hardened dangerous-pattern blocklist - confirming the root cause and that a patch path exists. Net: real and worth patching for anyone running the AI query feature, but the LLM-indirection gate and authentication requirement make widespread opportunistic exploitation unlikely.

Exploit ScenarioDerived

An authenticated Chartbrew team member uses the AI charting assistant against a connected Postgres/MySQL/ClickHouse source and crafts input that steers the model into producing a non-integer row_limit containing appended SQL. Because the read-only keyword check executes before row_limit is interpolated into the LIMIT clause, the smuggled statement bypasses the SELECT-only guard and executes against the backend database, enabling data theft, modification, or - where DB permissions allow - file access or OS command execution. No public proof-of-concept was identified at time of analysis, and exploitation depends on reliably influencing the model output.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 21, 2026

SQL injection in Chartbrew versions prior to 5.2.2 allows an authenticated user with access to the AI query orchestrator to smuggle arbitrary SQL into the database by influencing the model-generated row_limit value, which is concatenated into a trailing LIMIT clause after the application's read-only keyword check has already executed. Exploitation is conditional rather than trivial: the attacker cannot pass row_limit directly but must steer the LLM into emitting a non-integer value, and the connected data source must be of type postgres, mysql, or clickhouse for the vulnerable code path to apply. Impact is bounded by the privileges of the database account Chartbrew uses - data can be read or modified, and where that account has file or command privileges, file access or OS command execution becomes possible; no public exploit identified at time of analysis and the CVE is not listed in CISA KEV, with the vendor fix shipping in 5.2.2.

RemediationAI

Upgrade to Chartbrew 5.2.2 or later - this is the vendor-released patch that introduces integer validation of row_limit plus query normalization and a dangerous-statement blocklist (release: https://github.com/chartbrew/chartbrew/releases/tag/v5.2.2, commit: https://github.com/chartbrew/chartbrew/commit/8c8412edce56093e81b524e0235a796c7dd42336, advisory: https://github.com/chartbrew/chartbrew/security/advisories/GHSA-4923-m569-jc42). If upgrading is not immediately possible, the most effective compensating control is to disable the AI orchestrator query tool (or the Chartbrew AI features entirely) until the patch is applied - the trade-off is loss of AI-assisted charting for all users, but it removes the vulnerable runQuery() path, which is otherwise reachable only through that feature. In addition, constrain the damage any injection could cause by revoking superuser, FILE, and COPY ... TO PROGRAM privileges from the database account Chartbrew connects with, granting it read-only access to only the schemas/datasets in use, and network-restricting that account to the Chartbrew host; these measures substantially limit post-exploitation file and OS command access but do not eliminate the injection itself and may break legitimate write-back or admin functionality. Because exploitation depends on steering a model-generated value, restricting who can drive AI query generation to trusted operators is a further, weaker mitigation with the side effect of reducing feature availability; monitor database logs for anomalous or commented-out query fragments as a detection backstop.

Affected VersionsENISA

chartbrew < 5.2.2

Affected Packages

euvd chartbrew fix: 5.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-89 (improper neutralization of special elements used in an SQL command) in the AI orchestration layer of Chartbrew's Node.js server. In server/modules/ai/orchestrator/tools/runQuery.js, the runQuery() tool accepted an AI-supplied row_limit parameter and interpolated it directly into a string-concatenated ' LIMIT <row_limit>' suffix. The pre-existing read-only guard only scanned the query text for whole-word forbidden keywords (DROP, DELETE, UPDATE, INSERT, TRUNCATE, ALTER, CREATE) and, critically, ran against the query before the LIMIT fragment was appended - so anything carried inside row_limit escaped that check entirely. Because the tool executed only for source types postgres, mysql, and clickhouse, exposure is limited to those connectors. The fix commit 8c8412edce56093e81b524e0235a796c7dd42336 hardens this in several layers: getSafeRowLimit() coerces with Number() and requires Number.isInteger() > 0, defaulting to 1000 and capping at 10000; normalizeSqlQuery() requires the statement to begin with SELECT or WITH, rejects embedded semicolons (multi-statement), rejects SQL comments (--, /*, */), and applies a DANGEROUS_SQL_PATTERNS blocklist covering pg_read_file, pg_read_binary_file, pg_ls_dir, lo_export/lo_import, COPY ... TO PROGRAM, INTO OUTFILE/DUMPFILE, LOAD_FILE, LOAD DATA, GRANT/REVOKE, EXEC/EXECUTE, CALL, FILE(), and URL(); and result truncation was switched to slice(0, safeRowLimit). The same commit also bumps a default OpenAI model identifier, which is unrelated to the vulnerability.

Know when Chartbrew gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.8 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
vuln.today AI 8.4 HIGH

Authenticated (PR:L) network attacker; AC:H because injection must be laundered through model-generated output; S:C as impact lands on the separate connected database; C:H/I:H for read/write, A:L for conditional OS/file impact.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:L

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

1
Patch available
Sep 21, 2026 - 23:02 EUVD

DescriptionCVE.org

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.2, Chartbrew's runQuery() implementation in server/modules/ai/orchestrator/tools/runQuery.js interpolates the AI tool's row_limit parameter into a SQL LIMIT clause without runtime integer validation. The read-only keyword check runs before this value is appended, so an authenticated user who can influence a model-generated non-integer row_limit can add SQL that bypasses the earlier check. Successful exploitation can execute arbitrary statements against the connected database, including reading or changing data and, where database permissions permit, accessing files or executing operating-system commands. This issue is fixed in version 5.2.2.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
niche open-source self-hosted BI/charting tool, limited enterprise footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2026-27005 CRITICAL POC
9.8 Mar 06

SQL injection in Chartbrew before 4.8.3. PoC available.

CVE-2026-25888 HIGH POC
8.8 Mar 06

Remote code execution in Chartbrew prior to version 4.8.1 allows authenticated attackers to execute arbitrary code throu

CVE-2026-27603 HIGH POC
7.5 Mar 06

Chartbrew versions up to 4.8.4 is affected by missing authentication for critical function (CVSS 7.5).

CVE-2026-25887 HIGH POC
7.2 Mar 06

Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut

CVE-2026-25877 MEDIUM POC
6.5 Mar 06

Chartbrew versions before 4.8.1 fail to validate chart ownership during modification operations, allowing authenticated

CVE-2026-27605 MEDIUM POC
6.3 Mar 06

Chartbrew versions prior to 4.8.4 allow authenticated users to upload arbitrary files by bypassing file type validation,

CVE-2026-40600 HIGH
8.1 Apr 30

Authenticated users in Chartbrew 4.9.0 can modify or delete dashboard sharing policies across projects they don't own du

CVE-2026-40904 HIGH
8.1 Apr 30

Horizontal privilege escalation in Chartbrew 4.9.0 allows authenticated low-privilege team members to access datasets, d

CVE-2026-65980 HIGH
7.9 Sep 21

SQL injection in Chartbrew versions prior to 5.2.3 allows an unauthenticated remote attacker to break out of an intended

CVE-2026-30232 HIGH
7.8 Apr 10

Server-Side Request Forgery in Chartbrew versions prior to 4.8.5 allows authenticated users to create API data connectio

CVE-2026-32252 HIGH
7.7 Apr 10

Cross-tenant authorization bypass in Chartbrew versions prior to 4.9.0 allows authenticated attackers to exfiltrate sens

CVE-2026-40601 HIGH
7.5 Apr 30

Unauthenticated remote attackers can access and refresh private chart data in Chartbrew 4.9.0 via an exposed API endpoin

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy