Chartbrew: SQL Injection via row_limit Parameter in AI runQuery Tool
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA chartbrew (chartbrew) Fixed in 5.2.2
Timeline
- 2026-10-02 Threatist record created from CVE-2026-61852
References
More chartbrew vulnerabilities
- TI-2026-46993 Chartbrew: SQL Injection via Missing Backslash Escaping in ClickHouse Variable Substitution CVSS 4.0HIGH 7.9
- TI-2026-29337 Chartbrew: Missing Authorization in /api/chart/:chart_id/query via team-level refresh toggle CVSS 3.1HIGH 7.5
- TI-2026-29331 Chartbrew: Incorrect Access Control in public chart and export routes via missing onReport and SharePolicy checks CVSS 3.1HIGH 7.5
- TI-2026-29560 Chartbrew: Incorrect Access Control in dataset and dataRequest routes via team-scoped permission checks CVSS 3.1HIGH 8.1
- TI-2026-29336 Chartbrew: Incorrect Access Control in project share policy routes via unbound policy_id CVSS 3.1HIGH 8.1
- TI-2026-24781 Chartbrew Cross-Tenant Template Export and Secret Disclosure in `GET /team/:team_id/template/generate/:project_id` CVSS 3.1HIGH 7.7
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences