# CVE-2026-61852: Chartbrew: SQL Injection via row_limit Parameter in AI runQuery Tool

- Severity: Medium 5.8 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 32% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-21T21:39:52.579Z
- Modified: 2026-09-24T23:17:13.767Z
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.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.

(As written by CVE List.)

## Affected

- chartbrew chartbrew: < 5.2.2

## References

- <https://github.com/chartbrew/chartbrew/security/advisories/GHSA-4923-m569-jc42> (exploit)
- <https://github.com/chartbrew/chartbrew/commit/8c8412edce56093e81b524e0235a796c7dd42336>
- <https://github.com/chartbrew/chartbrew/releases/tag/v5.2.2>

## Sources

- CVE List: [CVE-2026-61852](https://www.cve.org/CVERecord?id=CVE-2026-61852), CVE Terms of Use, modified 2026-09-24
- NVD: [CVE-2026-61852](https://nvd.nist.gov/vuln/detail/CVE-2026-61852), Public domain, modified 2026-09-24

---

Page: https://cve.day/CVE-2026-61852 · Whole record: https://cve.day/CVE-2026-61852.json · Rebuilt by cve.day 2026-11-25T22:59:40.399Z
