Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as team Owner/Admin
-
DeliverySteer AI assistant via /ai/orchestrate question
-
ExploitModel emits quoted or sibling PG file function
-
ExecutionSELECT bypasses DANGEROUS_SQL_PATTERNS blocklist
-
ImpactRaw Sequelize execute reads files from PostgreSQL host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires ALL of: (1) Chartbrew AI features enabled, i.e. an OpenAI key configured on the instance (non-default); (2) the attacker authenticated as teamOwner or teamAdmin for the target teamId passed to POST /ai/orchestrate (enforced by checkAccess - above a plain team member); (3) an AI-enabled PostgreSQL connection whose stored database role can call server-side file functions. The attacker supplies no PostgreSQL credentials - Chartbrew holds them - but the DB role determines scope: a PostgreSQL superuser or pg_read_server_files member can resolve arbitrary absolute paths readable by the PostgreSQL OS user, while a non-superuser role is limited to the source-stated PGDATA-relative scope. The specific bypass primitives are the double-quoted identifier form of denied functions ("pg_read_file"(...), convert_from("pg_read_binary_file"(...),'UTF8')) and unlisted sibling functions (pg_stat_file, pg_ls_logdir/waldir/tmpdir/archive_statusdir, pg_current_logfile). Limiting factors: PR:H elevated Chartbrew privilege, dependence on the AI feature being enabled, and the connected DB role's filesystem privileges - absent a file-capable role there is no file disclosure. |
| Impact | This is a genuinely medium/low-urgency issue rather than a top-priority emergency, and the signals are internally consistent. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:H/UI:N, VC:N/VI:N/VA:N, SC:H) scores 4.6 (Medium): network-reachable but gated behind PR:H (team Owner/Admin) and AT:P (specific attack requirements - AI features enabled plus a PostgreSQL role that can call server-side file functions). The only impact is subsequent-system confidentiality (SC:H): arbitrary file read on the connected PostgreSQL host; there is no integrity or availability impact and no direct impact to Chartbrew itself. Exploitation status is 'no public exploit identified at time of analysis' in the KEV/POC sense - not in CISA KEV and no EPSS score was supplied - but this must be qualified: the GHSA advisory itself publishes concrete proof-of-concept payloads (e.g. SELECT "pg_read_file"('/etc/passwd')) and a full end-to-end reproduction driver against a pinned 5.2.2, so working exploitation detail is public even though it is not catalogued as actively exploited. The vuln.today decision label is 'this_month', consistent with Medium severity and high privilege requirements rather than act_now/emergency. Net: a real, confirmed defense-in-depth bypass worth patching on a normal cycle, but the PR:H + AT:P gating and confidentiality-only impact keep it well below the priority of an unauthenticated RCE. Note a fix-version conflict in the sources (see confidence_notes) that should be resolved before remediation tracking. |
| Exploit ScenarioDerived | An authenticated Chartbrew team Owner or Admin on an instance with AI features enabled (OpenAI key configured) uses the AI assistant against a PostgreSQL connection whose stored DB role can call filesystem functions, and steers the model to emit SQL using a double-quoted denied function or an unlisted sibling (e.g. SELECT "pg_read_file"('/etc/passwd') or SELECT pg_stat_file(...)). The blocklist's \b-anchored regexes miss the quoted form and never enumerated the siblings, so the SELECT passes the gate and executes raw, returning file contents from the PostgreSQL host. A detailed PoC and reproduction exist publicly in the GHSA advisory; practical reach depends on the DB role (superuser/pg_read_server_files for arbitrary absolute paths, otherwise PGDATA-relative). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 06, 2026
Arbitrary file read from the host of a connected PostgreSQL database is possible in Chartbrew 5.2.2 because the AI orchestrator's SQL denylist is incomplete, allowing a team Owner or Admin to steer the assistant's generated SQL into double-quoted identifier calls such as "pg_read_file"('/etc/passwd') or unlisted sibling functions such as pg_stat_file, pg_ls_waldir and pg_current_logfile that pass the gate and reach the raw Sequelize execute. Exploitation requires Chartbrew AI features to be enabled (an OpenAI key configured on the instance), an authenticated teamOwner or teamAdmin for the target team, and a connected PostgreSQL connection whose stored database role can call server-side file functions - a superuser or pg_read_server_files role can resolve arbitrary absolute paths, while a non-superuser is limited to the PGDATA-relative scope stated in the source. The advisory documents proof-of-concept payloads and an end-to-end reproduction against 5.2.2; no active exploitation is confirmed and the vendor shipped a fix in 5.2.3.
RemediationAI
Upgrade to the fixed release: the advisory and release tag identify Chartbrew 5.2.3 (https://github.com/chartbrew/chartbrew/releases/tag/v5.2.3) as the patched version, while package metadata lists 5.3.0 as the fixed version, so confirm your distribution's resolved version against both. The upstream fix in commit b83f656a8757beccba461f0f6c5abb1a25dc3b4c replaces the three per-function regexes with a single family-wide pattern, /(?:\b|")pg_(?:read|stat|ls|current_logfile)[a-z0-9_]*"?\s*\(/i, which covers the sibling functions and the double-quoted identifier form, and adds unit tests in runQueryTool.test.js for quoted-identifier and sibling-function payloads. If upgrading immediately is not possible, two evidence-supported measures reduce exposure: disable AI features (remove the configured OpenAI key from the instance), which removes the only reachable attack surface at the cost of losing the assistant; and replace the stored PostgreSQL credentials for AI-enabled connections with a non-superuser role that is not a member of pg_read_server_files, which restricts any residual bypass to PGDATA-relative file access rather than arbitrary absolute paths readable by the PostgreSQL OS user, at the cost of narrowing legitimate file-related queries. Review access so that teamOwner and teamAdmin roles are limited to trusted operators, since that privilege level is the attacker requirement. Full details: https://github.com/chartbrew/chartbrew/security/advisories/GHSA-jw2r-hrxg-cfgc.
Affected VersionsENISA
Affected Packages
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
Chartbrew's AI assistant exposes a run_query tool at POST /ai/orchestrate that executes LLM-generated SQL against a team's connected database. The only gate on that SQL before it reaches the live engine is normalizeSqlQuery in server/modules/ai/orchestrator/tools/runQuery.js, which enforces a SELECT/WITH prefix allowlist, rejects semicolons and SQL comments, and applies a DANGEROUS_SQL_PATTERNS denylist (CWE-184, incomplete denylist). The denylist enumerates three PostgreSQL filesystem functions by literal token (pg_read_file, pg_read_binary_file, pg_ls_dir) and anchors each regex on \b<token>\s*\(. Two gaps defeat it: the enumeration omits the rest of PostgreSQL's SELECT-callable filesystem family (pg_stat_file, pg_ls_logdir, pg_ls_waldir, pg_ls_tmpdir, pg_ls_archive_statusdir, pg_current_logfile), and the \b anchor does not match PostgreSQL's interchangeable double-quoted identifier form, so "pg_read_file"(...) and convert_from("pg_read_binary_file"(...),'UTF8') execute while the regex never fires. The tool's query argument is taken verbatim from the model's tool call (JSON.parse of toolCall.function.arguments), and only team_id is injected server-side, so whoever controls the natural-language question - directly or via prompt injection in data the model reads - controls the SQL transitively. The separate validateQuery tool is a stub returning valid:true, leaving normalizeSqlQuery as the sole control; passing payloads are forwarded unchanged via getQueryToExecute in server/sources/shared/sql/sql.protocol.js to dbConnection.query using Sequelize.QueryTypes.SELECT against credentials Chartbrew holds. This maps to CWE-22 in that the primitive is unauthorized file path access on the database host, with the weak-denylist aspect tracked as CWE-184.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
Network-reachable but PR:H (team Owner/Admin) and AC:H for the DB-role/AI-enabled attack requirements; S:C since files are read on the separate PostgreSQL host, C:H, no integrity/availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. In 5.2.2, the AI SQL blocklist omitted sibling PostgreSQL filesystem functions and failed to match double-quoted identifier forms of denied functions. The vulnerable surface is the AI query tool's PostgreSQL SQL-validation blocklist. A team Owner or Admin uses an AI-enabled PostgreSQL connection whose database role can call server-side file functions and causes generated SQL to use an unlisted sibling function or a double-quoted denied function. Unlisted sibling functions remain allowed, and double-quoted function identifiers bypass the denylist regular expressions and reach PostgreSQL. AI features must be enabled and the user must have elevated Chartbrew privileges. A PostgreSQL superuser or pg_read_server_files role can resolve absolute paths to files readable by the PostgreSQL OS user, while a non-superuser is limited to the source-stated PGDATA-relative scope. This vulnerability is fixed in 5.2.3.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
SQL injection in Chartbrew before 4.8.3. PoC available.
Remote code execution in Chartbrew prior to version 4.8.1 allows authenticated attackers to execute arbitrary code throu
Chartbrew versions up to 4.8.4 is affected by missing authentication for critical function (CVSS 7.5).
Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut
Chartbrew versions before 4.8.1 fail to validate chart ownership during modification operations, allowing authenticated
Chartbrew versions prior to 4.8.4 allow authenticated users to upload arbitrary files by bypassing file type validation,
Chartbrew 4.8.5 through 5.2.2 lets an authenticated user who can create or update API connections persist an internal `a
Authenticated users in Chartbrew 4.9.0 can modify or delete dashboard sharing policies across projects they don't own du
Horizontal privilege escalation in Chartbrew 4.9.0 allows authenticated low-privilege team members to access datasets, d
SQL injection in Chartbrew versions prior to 5.2.3 allows an unauthenticated remote attacker to break out of an intended
Server-Side Request Forgery in Chartbrew versions prior to 4.8.5 allows authenticated users to create API data connectio
Cross-tenant authorization bypass in Chartbrew versions prior to 4.9.0 allows authenticated attackers to exfiltrate sens
EUVD-2026-118511
NVD
CVE.org
EPSS
GitHub
Exploit-DB